Quantcast
Channel: MSBuildExtensionPack Discussions Rss Feed
Viewing all 468 articles
Browse latest View live

New Post: Extension Pack and Nuget

$
0
0
Hi Mike,

Not sure of the need for two packages, can the solution level package not serve for all purposes or have I missed something?

Scott.

New Post: Problem attaching database using SqlCmd

$
0
0
I have been trying to use the SqlCmd class to attach a database and for some reason, I am constantly encountering this error message:

MSBUILD : warning 5120: Unable to open the physical file "C:\Database.mdf". Operating system error 5: "5(Access is denied.)". [C:\DevSolutionBuild.proj]

This is the MSBuild command that I am using:
<PropertyGroup>
      <UseMasterDb>USE [master]</UseMasterDb>
      <DNNAttachSQL>CREATE DATABASE $(DNNDatabaseName) ON ( FILENAME = N'$(DNNDataFile)' ),( FILENAME = N'$(DNNLogFile)' ) FOR ATTACH;</DNNAttachSQL>
    </PropertyGroup>
    <Message Text="$(DNNAttachSQL)" Importance="high" />
    <MSBuild.ExtensionPack.SqlServer.SqlCmd TaskAction="Execute" Server="$(SqlServerName)" LogOn="$(SqlLogOn)" Password="$(SqlPassword)" CommandLineQuery="$(DNNAttachSQL)" />
The SQL executes just fine when I run it directly in SQL Server Management Studio and it succeeds in attaching the database, however, when I run it from within MSBuild, it always fails.

Please advise as to what I might be doing wrong.

Thanks.

New Post: Problem with TfsSource Get TaskAction

$
0
0
I am trying to use the following TfsSource MSBuild Task:
<MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Get" ItemPath="$/AProject/ADifferentPath" WorkingDirectory="C:\Projects\SpeedCMMI"> 
However, when I attempt to run this command on my local workstation, I get the following error message:

C:\Code\Build\Local\DevSolutionBuild.proj(40,3): error : Win32Exception: The system cannot find the file specified

I cannot understand how to resolve this issue since I am not completely familiar with how this MSBuild Task wraps the TF.exe command and how it gets around the problem of first mapping a working directory/workspace and then performing the Get/Get Latest Version operation.

Please advise as to how to solve this issue.

Thanks.

New Post: Extension Pack and Nuget

$
0
0
Ok I've uploaded 1.3.0.

Let me know if its ok.

Mike

New Post: xmlfile use

$
0
0
I have xml files that our applications uses and in the past we have use xmlpoke in this format
Old poke code
<xmlpoke file="${ShellAppDir}\Providers\ClientConfiguration.xml" xpath="//ClientConfiguration[1]/Provider[1]" value="${Provider}" />
<xmlpoke file="${ShellAppDir}\Providers\ClientConfiguration.xml" xpath="//ClientConfiguration[1]/Edition[1]" value="${Edition}" />
Target file
<?xml version="1.0" encoding="utf-8"?>
<ClientConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Provider>provider_TOKEN</Provider>
<Edition>edition_TOKEN</Edition>
</ClientConfiguration>
We have since moved to TFS and are using the extension pack to try and replace the token values. My issue is that I am not able add elements/attributes in the same format meaning with this product, I am getting closing tags with <name/> instead of </name>. Ideas on how to do this with your product? I have tried update element and attribute with no luck.

New Post: MSBuild.ExtensionPack.SqlServer.SqlCmd throws InvalidOperationException: No process is associated with this object on TeamCity

$
0
0
__I have a build script that works fine on local developer machines but throws the exception below when I execute the command on a TeamCity build server.

The command in the db.targets that's failing is:__
<ItemGroup>
        <RebuildSqlScripts Include="$(RebuildDirectory)\*.sql"/>
    </ItemGroup>

    <Message Condition ="'%(RebuildSqlScripts.Filename)' != ''" Text="Executing SQL Scripts in $(RebuildDirectory) on $(DatabaseName): "/>
    <!--<Message Text="SQL Script Files: @(RebuildSqlScripts)"/>-->

    <MSBuild.ExtensionPack.SqlServer.SqlCmd Condition ="'%(RebuildSqlScripts.Filename)' != ''" TaskAction="Execute" LogExceptionStack="true" Server="$(SqlServerName)" Database="$(DatabaseName)" LogOn="$(User)" Password="$(Password)" InputFiles="%(RebuildSqlScripts.Identity)" Variables="@(DatabaseVariables)" />


The exception:


[MSBuild.ExtensionPack.SqlServer.SqlCmd] C:\BuildAgent1\work\700df50f30b3154c\build\Database\Common\db.targets(97, 3): InvalidOperationException: No process is associated with this object.
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_HasExited()
at MSBuild.ExtensionPack.SqlServer.Extended.SqlCmdWrapper.Execute() in C:\Projects\CodePlex\MSBuildExtensionPack\Solutions\Main\Framework\SqlServer\SqlCmdWrapper.cs:line 105
at MSBuild.ExtensionPack.SqlServer.SqlCmd.ExecuteCommand(String arguments) in C:\Projects\CodePlex\MSBuildExtensionPack\Solutions\Main\Framework\SqlServer\SqlCmd.cs:line 480
at MSBuild.ExtensionPack.SqlServer.SqlCmd.SqlExecute() in C:\Projects\CodePlex\MSBuildExtensionPack\Solutions\Main\Framework\SqlServer\SqlCmd.cs:line 559
at MSBuild.ExtensionPack.BaseTask.Execute() in C:\Projects\CodePlex\MSBuildExtensionPack\Solutions\Main\Common\BaseTask.cs:line 85

__
Any idea what the error actually means? I looks like the underlying exception is being suppressed...
__

New Post: Incorrect syntax near '¯' when passing empty file to MSBuild.ExtensionPack.SqlServer.SqlCmd

$
0
0
I get this SQL Server error when I pass an empty file to MSBuild.ExtensionPack.SqlServer.SqlCmd:

Msg 102, Level 15, State 1, Server .\SQLEXPRESS, Line 1
Incorrect syntax near '¯'.

The file is generated by dbdeploy.net-2.1.0.0 (https://bintray.com/brunomlopes/generic/dbdeploy.NET/2.1.0.0/files) and it looks an encoding issues since it works fine if I open and save the blank file in e.g. Notepad.

Has anyone else encountered this?

New Post: Incorrect syntax near '¯' when passing empty file to MSBuild.ExtensionPack.SqlServer.SqlCmd

$
0
0
I got sent some sample files. They are UTF08 with a BOM (or some variation thereof). I tried adding -f i:65001 to the parameters to force it to use UTF8 but I get a similar message.

you could try converting the files to another format. Why do you need to execute an empty file?

Mike

New Post: Incorrect syntax near '¯' when passing empty file to MSBuild.ExtensionPack.SqlServer.SqlCmd

$
0
0
Thanks for the quick reply Mike!

I added a check to not run the file if it's empty so my script work fine. This is for a database CI process and the empty file happens when dbDeploy does not detect any changes for a specific instance of the target database and hence outputs an empty delta script.

It's only a slight annoyance and I just wanted to highlight this as others might have similar issues!

Thanks again for confirming why it failed!

New Post: Using command line to build windows service project

$
0
0
This is not related to this project. Please use an MS forum.

New Post: Problem attaching database using SqlCmd

$
0
0
Seems like a UAC error. What identitiy is executing the MSBuild? Does it work of if you dont create it in C: (protected) and rather something like C:\Test

Mike

New Post: Problem with TfsSource Get TaskAction

$
0
0
Could you run with /v:diag and provide the full results.

thanks

Mike

New Post: xmlfile use

$
0
0
That looks like the nant task rather then the one provided by ms... Using the MSBuild Extension Pack you could use
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="UpdateElement" File="${ShellAppDir}\Providers\ClientConfiguration.xml" XPath="//ClientConfiguration[1]/Provider[1]" InnerText="${Provider}"/> 
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="UpdateElement" File="${ShellAppDir}\Providers\ClientConfiguration.xml" XPath="//ClientConfiguration[1]/Provider[1]" InnerText="${Edition}"/> 
Mike

New Post: MSBuild.ExtensionPack.SqlServer.SqlCmd throws InvalidOperationException: No process is associated with this object on TeamCity

$
0
0
Hmmm.... I 'know' why this is happening, I just need to think about the best fix... Will get back to you... I'll also copy this to a workitem.

Mike

New Post: MSBuild.ExtensionPack.SqlServer.SqlCmd throws InvalidOperationException: No process is associated with this object on TeamCity

$
0
0
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.

New Post: MSBuild.ExtensionPack.SqlServer.SqlCmd throws InvalidOperationException: No process is associated with this object on TeamCity

$
0
0
Please let me know it the private build files i attached to the workitem work.

New Post: In VS2012, MSBuild.ExtensionPack.VisualStudio.TfsSource throws exception on checkout

$
0
0
We recently upgraded our TFS server from 2010 to 2012.

Since the upgrade, one of my existing build is now throwing "Win32Exception: The system cannot find the file specified"

<MSBuild.ExtensionPack.VisualStudio.TfsSource TaskAction="Checkout" ItemPath="$(BuildPasFile)" Version="2012" WorkingDirectory="$(ViewRoot)\Delphi\Source\acom"/>

The only change that I had to do as part of TFS upgrade is to change the Version from "2010" to "2012".

The exact command that gets fired is
tf.exe checkout "C:\Builds\Sources\Build..\Delphi\Source\acom\build.pas" /noprompt /recursive

I read the discussion on the following link:
http://msbuildextensionpack.codeplex.com/discussions/74209

As required, Environment variable for VS2012 is set to
VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\

I have verified that I am able to open / access the file using
Notepad.exe "C:\Builds\Sources\Build..\Delphi\Source\acom\build.pas"

I have also executed the TF.exe full command on the build server locally. It shows that tis Build.pas is open for edit.

$/Babylon Service Packs/Ananke/Delphi/Source/acom/build.pas:
opened for edit in 11_11_bal170099;builder
opened for edit in 11_12_P6PROFBLDAGENT1;builder
opened for edit in 11_2_p6profbldagent2;builder
opened for edit in 11_1_P6PROFBLDAGENT1;builder
opened for edit in 11_4_p6profbldagent3;builder

I am not sure, if the problem is due to multiple edits on the same file.

I am unable to resolve this Win32Exception.

Please let me know, if there is anything missing! What else do I need to check?

Please suggest!

Thanks,
Jatin N. Bhoir

New Post: Usage with NuGet installation

$
0
0
Can anybody answer this question? I'm having the same trouble - I want to install Extension Pack with Nuget before executing MSBuild script.
Nuget installs it, but the script doesn't work with it, it can't find necessary dlls.
I import the Extension Pack project with this string:
<Import Project="$(BuildPath)\packages\MSBuild.Extension.Pack.1.3.0\tools\net40\MSBuild.ExtensionPack.tasks"/>
But when running the script I have the following error:
error MSB4062: The "MSBuild.ExtensionPack.Web.Iis7AppPool" task c
ould not be loaded from the assembly C:\Program Files (x86)\MSBuild\ExtensionPa
ck\4.0\MSBuild.ExtensionPack.Iis7.dll. Could not load file or assembly 'file://
/C:\Program Files (x86)\MSBuild\ExtensionPack\4.0\MSBuild.ExtensionPack.Iis7.dl
l' or one of its dependencies. The system cannot find the file specified. Confi
rm that the <UsingTask> declaration is correct, that the assembly and all its d
ependencies are available, and that the task contains a public class that imple
ments Microsoft.Build.Framework.ITask.
So, it looks for Extension Pack dlls in Program Files, but Nuget installs it in different location.

New Post: Remote GAC installation

$
0
0
I receive the
error : Remote AddAssembly returned non-zero returnValue: 9
error after installing gacutil and adding it to the path.

However, after reviewing the source I am confused by this line.
methodParameters["CommandLine"] = @"gacutil.exe /i " + "\"" + this.RemoteAssemblyPath + "\"";
shouldn't this be using the local path variable for the assembly location? such as:
methodParameters["CommandLine"] = @"gacutil.exe /i " + "\"" + this.AssemblyPath.GetMetadata("FullPath") + "\"";

New Post: Remote GAC installation

$
0
0
I see there is no place where the local path for the remote machine is specified. Hence why the remote path is used instead. Does that means that CIM resolves the remote path into its local path?
Viewing all 468 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>