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

Create label on every check in + TFS

$
0
0

Is there a way to perform automatic "Apply Label" on every check in

This check in needs to be performed on a particular project only and not on all the projects in the TFS


Build failed in MSBuild

$
0
0

Hello,

I created a C++ MFC project and when configuring the build definition I kept the settings to default.

I received an error regarding these two files.

C:\Builds\1\TestFive\TestFiveAppTwo\Sources\D\Projects\TestFive\TestFiveApp\TestFiveApp\TestFiveApp.vcxproj (22)

: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

After doing some research I found reference to a work around and added this line to the build definition in the process tab under MSBuild Arguments:

/p:$(VCTargetsPath)="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.props"

Once I did this it appeared to resolve the issue related to “C:\Microsoft.Cpp.Default.props” However after that I no longer saw the issue related to C:\Builds\1\TestFive\TestFiveAppTwo\Sources\D\Projects\TestFive\TestFiveApp\TestFiveApp\TestFiveApp.vcxproj

Once I did the work around the issue for not finding this c:\build\1….  Disappeared and I only saw a vague error message

Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException)Exception Stack Trace:   at System.Activities.Statements.Throw.Execute(CodeActivityContext context)  at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)  at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

After fixing some Windows updates (KB2822241) (KB2998527), (KB2966827) and a code a code 800B0001 for a day I no longer needed the work around for C:\Microsoft.Cpp.Default.props”  and then was able to see the c:\build\1….   error again.

Without making any changes to the settings the error “C:\Microsoft.Cpp.Default.props” has reappeared a couple days later.

I went back to check for Windows Updates I get a code 800B0001 that was resolved by our IT but is now back again.

As a reference I created a simple C Sharp project that passes this portion and just has some warnings for an earlier part.

This appears to be failing at the “Get Impacted Tests, Index Sources and Publish Symbols. I unable to find what is generating the request for this file in the properties and options.

I can detailed log and or diagnostic log, or any other information that would assist resolving this issue.

Thank you,

Marla Manley

How to package a .Net dektop app installation so it can be downloaded

$
0
0
Okay, I looked through the forums and thought this would be a common questions, but I could not find the answer. Here is the issue. I have an setup.exe, which is an installation for a .Net Desktop application.  I would like end users to be able to go to a site and download the exe and install it.  The problem is that browsers and other security programs try to prevent it even though it is safe.  How do I package my exe so it is not subject to these security walls.  It is digitally signed by a third party but that only makes it look safe once it is already installing.  The problem is the download.  I have read some things about creating a self-extracting zip file, but it seems that would run into the same issues.  Any ideas would be appreciated.  Thank you in advance.

MSBuild - redirect compiled dll to another folder

$
0
0
Hello.  When compiling a project via MSBuild, is it possible to add code to my MSBuild.proj file that will override the OutputPath setting in the actual project file?   For example, if TestProj.vbproj has the output path set to c:\anyfolder within the project, how do I override that setting within my MSBuild.proj file so that when I compile TestProj.vbproj, I can redirect the resulting dll to another folder (like c:\anotherfolder\TestProj.dll)?    Thank you.

How do I set IIS application name?

$
0
0

I have solution with two web Projects developed using Visual Studio 2013. I want msbuild to publish these as packages. Therefore, I created publish profiles for these Projects and selected publish method "web deploy package", typed site names ("Default Web Site\Web" and "Default Web Site/ProcessNotificationService") and selected configuration Test. This works when publishing from Visual Studio. Parameter files get generated with, in the first case

<setParameter name="IIS Web Application Name" value="Default Web Site\Web" />

But when I build the solution with MSBuild like this:

msbuild Master.sln /p:CreatePackageOnPublish=true /p:DeployOnBuild=true /p:Configuration=Test

I get

<setParameter name="IIS Web Application Name" value="Default Web Site/Web_deploy" />

I don't want to build these Projects separately and use /p:DeployIisAppPath since I'm using hosted build on Visual Studio Online.

What am I missing?


CopyFilesToOutputDirectory copies PDB files to output folder

$
0
0

Hi.

I have upgraded from VS 2008 to VS 2010.  Everything is fine except one thing.

After a build of a project in VS 2010, the pdb file also gets copied to the output directory.  In the build log, it clearly states

CopyFilesToOutputDirectory: Copying .../int/File.pdb to ...bin/File.pdb"

This did not happen in VS 2008. 

The pdb file is also in the intermediate folder (which is as expected and that path is defined in the project settings).

What can I do to prevent the copy of the pdb file to the output folder?

Please advise.  Thanks.

Jeff

How Can : after building project, copy project exe to new_name.exe and run new_name.exe

$
0
0

How Can : after building project, copy project exe to new_name.exe and run new_name.exe

such: project_name.exe -> project_name__2014_10_26_20_35_01.exe

project_name__{yyyy-MM-dd_HH_mm_ss_ffff}.exe

than process/shell execute :

project_name__{yyyy-MM-dd_HH_mm_ss_ffff}.exe


Msbuild error in command line,Error MSB4067

$
0
0

Hello, 

Configuration

Microsoft WIndows 2012 R2 Standard

Microsoft Visual Studio Ultimate 2013 Update 2

Framework of my project is 3.5

when trying to build my project from command line console, I got this error

commande is

C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe "D:\Test\Test.vbproj"

Message error

Microsoft (R) Build Engine, Version 3.5.30729.7903
[Microsoft .NET Framework, Version 2.0.50727.8000]
Copyright (C) Microsoft Corporationÿ2007. Tous droits r‚serv‚s.

C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.VisualBasic.targets(132,3): error MSB4067: The element <ImportGroup> beneath element <Project> is unrecognized.

Thank you.


VS 2013 MSI Installer

$
0
0
I am using the new MSI installer that has returned to VS 2013. In File System (Setup) I added a "Common Files Folder" (ProgramData) and added folders below that with files to populate some of those folders. However, the installer fails to create the folders when the setup.exe is run. I did the exact same thing in VS 2010 using the previous installer and it worked fine. It fails with the installer provided for VS 2013.

MSBuild binary compatibility

$
0
0

Hi everyone,

   Does anyone know if binary compatibility mode can be set when compiling VB6 projects via MSBuild?    In other words, I want to be able to compile in binary compatibility mode,  and also in non-binary compatibility mode.    I am using the following excerpt to compile my projects--- and I'm hoping that there is something that I can add to my excerpt that will allow for me to determine binary compatibility mode and non-binary compatibility mode for the compile.     Thank you.

<MSBuild   
   Projects="@(ProjectToBuild)"
   ContinueOnError="false"
   Properties="Configuration=Release;OutDir=c:\msbuild_tbb\testcibuild\">  
</MSBuild>

Getting compilation error for Post build event.

$
0
0


I am not able to fix this compilation error.

1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(134,5): error MSB3073: The command "set path=C:\source\PCDMIS2015_qa\FeatureTools\Testing\..\..\ThirdParty\Intel\MKL\x64;C:\source\PCDMIS2015_qa\FeatureTools\Testing\..\x64\Release;C:\source\PCDMIS2015_qa\FeatureTools\Testing\..\..\bin\x64\Release;%PATH%
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(134,5): error MSB3073: C:\source\PCDMIS2015_qa\FeatureTools\Testing\x64\Release\FeatureToolsTest.exe
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(134,5): error MSB3073: :VCEnd" exited with code -1073741515.

in my post build event set up i have some thing like below ..

set path=$(ProjectDir)..\..\ThirdParty\Intel\MKL\$(Platform);$(ProjectDir)..\$(Platform)\$(Configuration);$(ProjectDir)..\..\bin\$(Platform)\$(Configuration);%PATH%$(TargetPath)

Turning off msbuild warnings (MSB3305)

$
0
0

Hi there -

is there ANY way to turn off msbuild warnings (e.g. MSB3305)?

09:50:17.900    29>C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(2234,5): warning MSB3305: Processing COM reference "" from path "C:\Windows\System32\stdole2.tlb". The type library importer could not convert the signature for the member 'DISPPARAMS.rgvarg'. [C:\Builds\1\BINARY\Tool_CI\src\Tool\Apps\Platform\Platform.csproj]

We'd like to establish a 0 warnings policy for our project - and not set the warning level to0 - but cannot get rid of the mentioned warning on our build server.

Any suggestions much appreciated!

Thanks,
Jay


fatal error C1510: Cannot load language resource clui.dll.

$
0
0

Hello,

When compiling a big project 64 bit using VS 2012, getting following error

fatal error C1510: Cannot load language resource clui.dll.

Can't seem to find any solutions. The Debug build works fine.

The Development server is Window  7 64 bit, having 12 GB of memory and 24 GB of virtual memory.

Please advice.

Thanks,

- Srini

MSBuild Error While creating new project in VS

$
0
0

Hi, 

I am facing one issue in integration of WDK 8.1 with Visual Studio 2013 . I followed the steps below.

1. Installed Visual Studio Professional 2013
2. Installed Windows WDK 8.1 

While creating any new KMDF or UMDF project. I am getting following error and not able to create any project

Unable to read the project file "KMDFDriver1.vcxproj".
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Win32\PlatformToolsets\v120\Toolset.props(27,3): The imported project 
"C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Common.props" was not found. 
Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Can anybody tell me what is the problem or give some idea to overcome this issue ?

How to build a solution within C# (.NET 4.0) ?

$
0
0
 

With .NET 3.5 I could build a solution or a project with the following code:

Engine e =newEngine();

BuildPropertyGroup properties =newBuildPropertyGroup();

properties.SetProperty("Configuration","Release");

properties.SetProperty("Platform","Any CPU");

bool ok = e.BuildProjectFile(solutionOrProjectFileName,newstring[] { "rebuild" }, properties);

 

With .NET 4.0 the class Engine has been deprecated.

With the following new way I can build a project but no solution:

var pc =newProjectCollection();

pc.SetGlobalProperty("Configuration","Release");

pc.SetGlobalProperty("Platform","Any CPU");

BuildManager.DefaultBuildManager.Build(newBuildParameters(pc), newBuildRequestData(newProjectInstance(projectFileName), newstring[] { "Rebuild" }));

 

HOW CAN I BUILD A COMPLETE SOLUTION???


Problems using MSBuild in a build server without any Visual Studio

$
0
0

Hi there.
Fisrt of all, I must mention that I am not a .NET analyst/developer.

Assuming that, I have the following scenario:

- I have a Win2008R2 server with all .NET Frameworks installed (version 1 up to 4.5) and also some Microsoft SDK's too;
- I simply need to run msbuild from a PowerShell command prompt in order to build different .sln files;
Example: ${msbuild_dir}/MSBuild ${solution_file} /t:Clean,Build /p:Configuration=Release /p:Platform="Any CPU";OutDir=${output_dir}

- For some .sln this command line is enough to get all compiled files. 
 Unfortunately for some others, I got stuck in the compiling process with one of the following errors:

1) Specified .targets files are not found on the server
It only varies the VS version, but many solutions stop the building process asking for one of these:

<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" />

The easiest turn around I have found to solve this was to manually remove those references from the specified .csproj file.
After doing that and re-running the same command line above, the whole .sln compilation goes fine.
The question is: how can I avoid getting this error considering that:
- I cannot install any VS in the server;
- I cannot even copy these .targets files to MSBuild directory in the server;
- I must avoid removing that manually from the .csproj file.

2) Solution version is not up-to-date for MSBuild
Some .sln simply do not start compiling. I got the following error message:

MSB4054: The solution file must be opened in the Visual Studio IDE and converted to the 
latest version before it can be built by MSBuild.

Ok! That's easy and great! =)

The problem is:
- I have almost 200 different .sln files that are giving me this error;
- I do not have contact with the responsible developers that should solve that issue;

I just need to know if maybe there is a special parameter that I could change the solution version or if I must follow the message guide and change each one in VS manually.

Please if any of you guys could help me I would be very thankfull.

Regards,
Luis Santos





TFS Build ISSUE

$
0
0

Thanks In Advance. From Last 10 days I am facing this issues. Please Help

Configuration Details

TFS Server - Visual Studio 2010

Build Server - Visual Studio 2010

Web Application - Visual Studio 2013[SOA Architecture (Silver light Used)]

ISSUE

1. I have created a new workspace and get all the code from tfs build the solution. Its building successfully

2. I have created a build using Team Explorer - Build

  a) Set the Source control Folder - TFS Folder Path containing the project solution. and set the Build Agent Folder - $(SourceDir)

  b) Set the Build Controller in Build Default and also set the Copy Build output Folder. Build Controller is tested its working fine.

 c) In Process Section 

Itemns To Build ->Configuration To Build ------>Any CPU/Debug

Itemns To Build ->Project To Build --------> Selected the Project solution

Logging Verbosity ---Diagnostic

Perform code Analysis - Never

Agent Setting 

Analyse Test Impact - false

Associate Changeset And WorkItem = false

Create WorkITem on failure - False

Disable Test - False

MS Build Argument - /m /p:VisualStudioVersion=12.0

When I run the build below exception throws

C\Program Files(x86)\MSBuild\MicrosoftVisualStudio\v12.0\Web\Microsoft.Web.Publishing.Target(182) could not copy the file "...\dll" because it was not found

I have already checked on VisualStudioVersion=11.0 and VisualStudioVersion=10.0.. Same issue raised


MSBuild Errors while building VSTO Addin's

$
0
0

Hi,

I recently migrated my VSTO Add in projects from "VS2008 and office 2007" to "VS2013 and office 2013", Changes took place as  below settings.

1. .Net Framework version from 3.5 to 4.5(While upgrading project).

2. I have added VSTO 2013 PIA assemblies to reference.

That's it, when i tried to compile i have faced below MSBuild errors.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(268,13): error MSB4064: The "TargetFrameworkVersion" parameter is not supported by the "SignFile" task. Verify the parameter exists on the task, and it is a settable public instance property.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets(264,9): error MSB4063: The "SignFile" task could not be initialized with its input parameters. 

and i have tried to find solutions over the internet but couldn't find much, Any Solutions for this problem will be helpful.

is there a way to conditnally import a extension pack?

$
0
0

is there a way to conditionallly import a extension pack if not already imported??

we have multiple project files that import the community tasks, we sometimes run them standalone and have the import in each (sub)project file

we also have the tfsbuld.proj file that imports all of the sub-project files and we get numerous warnings "

"C:\Program Files (x86)\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" cannot be imported again. It was already imported at ....

Installing and compiling in x64 bit

$
0
0
my settings currently

http://oi60.tinypic.com/10rvk40.jpg

I still cant target x64 bit applications, do I need to install a different toolset or something? I'm very very new to this and currently have 0 idea how to compile in 64 bit
Viewing all 2763 articles
Browse latest View live


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