Quantcast
Channel: MSBuild forum
Viewing all 2763 articles
Browse latest View live

How to Publish WCF Service using MSBUILD

$
0
0

Environment: VS2010 and TFS 2010 on Microsoft Virtual PC

Am trying to mimic the PUBLISH call essentially done in IDE using MSBUILD and so far when I issue the publish command, it only generates the DLL, it does not generate the *.svc files nor the web.config

Appreciate any pointers.

Thanks!


Delete and Copy Files From Another Project - But Not Every Build

$
0
0

Hi 

Apologies for the basic question. I want to delete and copy files from another project from time to time but not every build.

I use TFS on Azure which gets very confused by copy and delete actions that happen outside of Visual Studio. Therefore I want the process to be kicked off from within Visual Studio but as I said, not part of the build process.

I gather this would be done via an MSBuild script but how do I get started with that.

Thanks for reading

Upgrade TFS controls for VS2012 - Microsoft.TeamFoundation.WorkItemTracking.Controls.dll is lost during build

$
0
0
I have TFS control which works fine for VS 2010 and now has to be upgraded to be compatible with VS 2012. Updated version (11.0.60315.1) of referenced library Microsoft.TeamFoundation.WorkItemTracking.Controls.dll was got from C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies; while changing reference I was asked by VS to upgrade target framework of my project - ok, it was changed to .New Framework 4.0. In result no errors are shown, correct reference seems to be used, but during build reference is lost, build failed (looks like my project uses wrong target framework). Same for attempt to change target framework to .New Framework 4.0 Client Profile; changing Target CPU also does not help.

Parallelise target batching

$
0
0

Hi Chaps

I'm sure that this has been asked many times before I can't find them...

I have a dynamic ItemGroup which my target batches through - and I would like to have each iteration execute in parallel.

I *think* that the following are not of use to me:

Mike's MSBuild.ExtensionPack.Framework.Parallel TaskAction="BuildTargetsInParallel" (as I can't have specific targets defined at design time)

MSBuild BuildInParallel="True" (as it is one project) - ditto exec MSBuild

/m (because that does not effect batching - only allows an independent target to be running simultaneously)

I assume that an inline task (probably using a parallel.foreach) is the only way...

Am I missing a trick?

Thanks

Neil

how to add a directory for project clean?

$
0
0

Greetings,

I have specified the build output for specific folders via build post-event command like,

I'd like now to know how to specify the clean for cleaning the build files which are inside those folders?

thanks a lot for helping.

fatal error LNK1104: cannot open file 'irvine32.lib'

$
0
0
whenever i build main.asm from irvine it gives me this error.. help needed

Unable to build SSIS package using MSBuild

$
0
0

Hi Team,

I tried to build a SSIS package "btproj" file using MSBuild and I got the below Error

The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.

Can you please help me on this

Build errors : error MSB4217: Task host node exited prematurely.

$
0
0

Hi,

I met one wired problem when I build the C# project which is built based on .NET framework 3.5.

It says:

error MSB4217: Task host node exited prematurely. Diagnostic information may be found in files in the temporary files directory named MSBuild_*.failure.txt. 

I could not any information about what this means for me.

Any idea?


upgrade to dotnet 4.5 on tfs build agent throws MSB4006 error

$
0
0

I have a solution with several hundred projects. Builds were running fine with dotnet 4.0 on the build agents.

After upgrading to dotnet 4.5 builds are throwing folllwing error, and the build order of projects with in the solution seem to be different compare to how it was with dotnet 4.0. Couldn't find much help with the blogs. Please help on how to fix.

c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1381,5): error MSB4006: There is a circular dependency in the target dependency graph involving target "ResolveProjectReferences"

Regarding MSbuild- clickonce publish folder

$
0
0

I am using the below command to get a clickonce build.

msbuild /v:n /target:clean;publish /p:Configuration=Release /p:
SolutionDir="D:\Projects\Verify\\" "D:\Projects\Suite\Verify\sample.csproj"/p:OutputPath="D:\Repository\Suite\Sample"

The problem i have is  , this creates 2 folders 

1. Sampleapp.publish 

2. Sample

The (1) is clickonce folder and the later is the normal folder. I don't require the normal folder , how do i disable msbuild creating it. ??


What is Product code for vcredist_x86.exe for VS 2012?

$
0
0

Hi,

I need to include the vcredist_x86.exe file for VS 2012 (not 2010 or earlier) in a Bootstrapper script that msbuild uses to build a WIX installer.

The 2010 version had a product name in the script that would allow msbuild to find the correct file.

The product name is in the product.xml file in the SDK folder next to the vcredist_x86.exe file.

The problem is that VS 2012 does NOT install the vcredist_x86.exe file or the product.xml file.

I can download the exe file but I cannot find the product.xml file.

I've spent hours googling and downloaded every SDK I can find.

I found a posting on an MS site that said this was a bug in the VS installer and would be remedied in the current installer.  This was a old posting.  I've downloaded the current installer en_visual_studio_professional_2012_x86_dvd_2262334.iso.  It still does not install either of the two files.

I cannot guess the exact spelling of the product code for the vcredist_x86.exe file.

It is not the same as the VS 2010 version with the "v10" replaced with "v11".

Any help would be greatly appreciated.

The script for 2010 contains:

<BootstrapperFile Include="Microsoft.Visual.C++.10.0.x86"><ProductName>Visual C++ 2010 Runtime Libraries (x86)</ProductName></BootstrapperFile>

I need the equivalent for VS 2012.

Thanks,

David


Msbuild Error While using Multilingual App Toolkit

$
0
0

I'm getting following error when I try to do build from command line using 'msbuild'.

C:\Program Files (x86)\MSBuild\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.WindowsStore.targets(23,5): error MSB4062: The "MultilingualBuild" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.Build.WindowsStore.dll 

Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.Build.WindowsStore.dll' or one of its dependencies.

An attempt was made to load a program with an incorrect format. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\Build\MyProject\MyProject.csproj]

The same project gets compiled when I try to compile it from Visual Studio.

I'm executing following 'msbuild' command

> msbuild /t:Rebuild /t:Publish /p:Configuration=Release /p:Platform=x64  MyProject.sln

Let me know if I'm missing any command line options.

How to configure MSBuild to copy files from TFS to some target/drop folder replacing tokens with values from Common.{env}.config files (XML files)

$
0
0

Similar to Ant's <copy> task with filtering="true", I would like to configure my MSBuild to get a file from TFS which contains tokens and replace those tokens with corresponding values from the XML file, Common.{env}.config, which we have in our project in TFS.  These Common.{env}.config files have the same format as Web.{env}.config files.

<configuration>

    <appSettings>

        <add name="shopBaseUrl" value="//shop.somesite.com"/>

        <add name="ftpBaseUrl" value="//ftp.anothersite.com"/>

    </appSettings>

</configuration>

And then the input file is a JavaScript file, require-config.js, like this:

    var shopBaseUrl = '${shopBaseUrl}';

    var ftpBaseUrl = '${ftpBaseUrl}';

The output file should look like this, require-config.js:

    var shopBaseUrl = '//shop.somesite.com';

    var ftpBaseUrl = '//ftp.anothersite.com';

using MsBuild for a console program which log4net can not write log after start window service

$
0
0

using MsBuild for a console program which log4net can not write log after start window service

after add requirepermissin="false" and build in VS2012 and use Castle.Windsor and Topself and install and start window service in cmd, it can write log

however, after using some script to build it, it can not write log after start window service for  executable file, then i read the script, it use msbuild

part of script

task Clean -depends Init {

    exec { msbuild $SolutionFile /property:Configuration=Debug /t:clean}
    exec { msbuild $SolutionFile /property:Configuration=Release /t:clean}
    
    if (Test-Path $DeployDir) {
        ri $DeployDir -Recurse
    }
    
    ri SpecsFor*.nupkg
    ri specsfor*.zip -ea SilentlyContinue
}

task Build -depends Init,Clean {
    exec { msbuild $SolutionFile /property:Configuration=$Environment /property:OutputPath=$BinPath /property:Platform="x86"}
}


---v-----!


Microsoft.Cpp.Win32.user property sheet file shared by both VS2010 and VS2012?

$
0
0

I have both VS2010 and VS2012 installed.  The problem I had initially was that VS2012 projects would not build complaining of a missing Kernel32.lib file.  Subsequent searching through the forums revealed the issue was that the Microsoft.Cpp.Win32.user property sheet file was referencing in Library Directories "$(WindowsSdkDir)lib" which will not work for VS2012.  It should be changed to "$(WindowsSdk_LibraryPath_x86)lib" instead. 

I changed it and that does make VS2012 build okay but it breaks VS2010.  It appears both VS2010 and VS2012 use the same Microsoft.Cpp.Win32.user file.  Is there some way to have VS2012 use a different Microsoft.Cpp.Win32.user from VS2010 so that both will build projects successfully?  The file is located in C:\Users\<me>\AppData\Local\Microsoft\MSBuild\v4.0.

If the Microsoft.Cpp.Win32.user property sheet is meant to be shared by all VS versions, then is there some way to have all new VS2012 projects automatically inherit a custom property sheet I create?  For example, I made a custom property sheet called"Common" that is identical to Microsoft.Cpp.Win32.user.props except that "$(WindowsSdkDir)lib" was changed to "$(WindowsSdk_LibraryPath_x86)lib" in the Library Directories row and I added that to my VS2012 project.  It built successfully (while VS2010 projects are unaffected). 

So my VS2012 project now shows this in property manager:

Thanks in advance for solutions.


Getting this error: The OutputPath property is not set for project 'xxxx'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='HPD'.

$
0
0

Hi,

I am getting this error and not sure what is the setting for this. 

The OutputPath property is not set for project 'XXXX'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='HPD'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. 

I have property group

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

Not sure what is HPD for?

any help?

Problem during build the msi package

$
0
0

Hi All,

I am getting some while making the msi package:

When I change the Debug to Release mode then the output path getting changed. I want to fix this path .

Anybody can answer me.

Regards,

Parmod

Build Error in VS 2012

$
0
0

I have migrated 2010 solution to 2012.

I have opened VS 2010 solution in 2012. After conversion wizard while rebuilding the solution i am facing the build error.

The "TransformFiles" task was not given a value for the required parameter "IsDebugging".

I did not found any work around for this.

Other VS 2010 solutions converted to VS 2012 are working fine.

Any help is appreciated

Thanks & Regards

----------------------------------

Programmer Kadapa.

India.

Setting up a ConsoleLogger with MSBuild

$
0
0

Hi,

I am new to MSBuild and have questions about the ConsoleLogger. I am compiling a C++ solution using C# application. It builds, but I want to capture the output of the build activity like Visual Studio, but I don't know how to setup the ConsoleLogger (is that what I should use?).

How do I set up the ConsoleLogger and its handlers?

Thanks,

Chip

            var globalProperty = new Dictionary<string, string>();
            globalProperty.Add("Configuration", configuration);
            ConsoleLogger logger = new ConsoleLogger(LoggerVerbosity.Normal);
            BuildParameters bp = new BuildParameters(new ProjectCollection());
            bp.Loggers = new List<ILogger>() {logger};
            BuildRequestData brd = new BuildRequestData(@"c:\sample.sln", globalProperty, null, new string[] { "Build" }, null);
            BuildResult result = BuildManager.DefaultBuildManager.Build(bp, brd);
            if (result.OverallResult == BuildResultCode.Success)
            {
                return true;
            }
            return false;

Here is my code:

Build error after updating to VS 2013

$
0
0

Just upgraded to VS 2013 and have a WPF/MVVM project that gets this error when trying to build:

Error5Unable to copy file "C:\Code\CRM\CRMPrototype\packages\ModernUI.WPF.1.0.4\lib\net40\Microsoft.Windows.Shell.dll" to "bin\Debug\Microsoft.Windows.Shell.dll". Access to the path 'bin\Debug\Microsoft.Windows.Shell.dll' is denied.CRMPrototype

Viewing all 2763 articles
Browse latest View live


Latest Images