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

Run proj file

$
0
0

How can I run proj file without actually using TFS builder? Can I run it from command line? I dont want to check in the proj file till I get it right.

Thanks


How do i build a vdproj file using devenv

$
0
0

I am trying to build a vdproj file using devenv.  I have read several post that explain how I can do it by embedding a <exec/> task in the project file and having it invoke devenv.  I'm trying to build the project outside of visual studio using a CI tool.  My concern with adding this code into the project file is how somebody is effected building it within visual studio.

I have read that I can call the command as follows:


devenv "c:\your solution file.sln"/Project"c:\your setup project file.vdproj"/Build"Release"

when I run it using: devenv my.sln /project myproject/myproject.vdproj /Build "Release"

I get a usage error print out that says:

The first argument for devenv is usually a solution file or project file.
You can also use any other file as the first argument if you want to have the
file open automatically in an editor. When you enter a project file, the IDE
looks for an .sln file with the same base name as the project file in the
parent directory for the project file. If no such .sln file exists, then the
IDE looks for a single .sln file that references the project. If no such single
.sln file exists, then the IDE creates an unsaved solution with a default .sln
file name that has the same base name as the project file.

Command line builds:
devenv solutionfile.sln /build [ solutionconfig ] [ /project projectnameorfile [ /projectconfig name ] ]
Available command line switches:


What is the correct way to be able to call a vdproj file from a command line so I can build it via the command line from within a CI tool?

MSBuild is failing randomly with API call 'GetAssemblyRefHash' failed '0x8007000e' : ErrorMessage: Not enough storage is available to complete this operation.

$
0
0

Hi,

I have a really odd and hard to diagnose issue with MSBuild / TFS. I have a solution that contains about 12 different build configurations. When running on the build server, it takes maybe 30mins to build the lot and has worked fine for weeks now but now is occasionally failing.

fatal error C1093: API call 'GetAssemblyRefHash' failed '0x8007000e' : ErrorMessage: Not enough storage is available to complete this operation.

The error will sometimes happen on a different file. It won't happen for every build configuration either, it's very inconsistent and occasionally even builds all of them successfully. There's not much different between the build configurations either, mostly it's just a few string changes and of course they all build locally just fine.

The API call in question is usually GetAssemblyRefHash but not always. I suspect there's some kind of resource issue at play here but I'm at a loss as to what: There's plenty of HDD space (Hundreds of GB's), plenty of RAM (Machine originally had 4GB minimum allocated but was dynamic as it's a Hyper-v - it never pushed above 2.5GB. I upped this to 8GB minimum just in case and there's been no change).

I've set the build verbosity to diagnostic and it doesn't really show anything else that's helpful, just the same error.

I've tried monitoring for other "finite" resources but I've not noticed anything hitting a limit before the build fails.

For reference, the build server is fully up to date on all patches. It's running Windows Server 2012 R2, has TFS 2013 and VS 2013 installed, both are on Update 4.

I'm really at a loss at this point and would appreciate any help or pointers.


MSBuild execute bat file

$
0
0

In my proj file I need to modify <Exec Command="mxmlc.exe .....

to use mxmlc.bat. I did change the extension to bat but when proj file runs it does not do anything. Batch files are not executed. What am I doing wrong?

Thanks


How can export windows appliction as SWF not EXE

$
0
0
I want to export the project for Windows Application Form as SWF not EXE to run it online on website ?? Or if you have any idea for how can run exe located on website host online .. please tell me

Thanks :)

The "SignFile" task was not given a value for the required parameter "CertificateThumbprint"

$
0
0

We have a line of business app which is deployed via clickonce. I can build and publish the application without any problems but when I try to use Continuous Integration (Build each check-in) I get the following error:

2>C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(3450,5):
error MSB4044:
The "SignFile" task was not given a value for the required parameter "CertificateThumbprint".
[C:\Builds\1\Pulse\DefaultBuild\src\Pulse\Pulse\Pulse.csproj]
Done executing task "SignFile" -- FAILED.

We sign the application (to be more specific: the ClickOnce manifest) using a code signing certificate which is registered in the AD as Trusted Publisher.

The Certificate is stored in Certificate store on my local workstation. The Certificate is also in the certificate store of the build server (1. In the Personal Store, 2. in the Personal store of the TFSBuildServiceHost Service Account and 3. in the Personal store of the tfs/build server itself).

Where are using Visual Studio 2013 Update 4, C#, .Net 4.5 and TFS 2013 Update 4.

I have no glue what causes this error, any help is appreciated.

error MSB4044 The "SignFile" task was not given a value for the required parameter

$
0
0

Hi,

I have a WPF project, that I could build with Visual Studio 2012. Trying to build that project with Visual Studio 2013 I get the following error:

error MSB4044: The "SignFile" task was not given a value for the required parameter "CertificateThumbprint".

My application can be deployed using ClickOnce.

Where, how and why I should set the Parameter 'Certificate Thumbprint'.

Thanks,
Christian

Converting NAnt Exec task over to MSBuild Exec task

$
0
0

I am a long time user of NAnt and I have been used to using the Exec task available with NAnt as described here: http://nant.sourceforge.net/release/latest/help/tasks/exec.html

One of my favorite features of NAnt that I used very frequently and heavily was the arg elements that I include as subelements of the exec task.

However, when I examine the MSBuild Exec task, I cannot find any such equivalent functionality in MSBuild as what I was using previously with the exec task in NAnt.

Can anyone tell me if there is a way to accomplish the same thing with NAnt?

Thanks.


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


Using metadata in conditions

$
0
0

I'm trying to make a .targets file for my NuGet package, which will link to a proper .lib file depending on the C++ runtime library of a project. This answer recommends to use %(ClCompile.RuntimeLibrary) metadata for this. But I cannot use metadata in condition of the <ItemDefinitionGroup> node. When trying to run MSBuild with the following test script:

<?xml version="1.0" encoding="us-ascii"?><Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><ItemGroup><ClCompile Include="main.cpp"><RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary></ClCompile></ItemGroup><ItemDefinitionGroup Condition="'%(ClCompile.RuntimeLibrary)'=='MultiThreadedDebugDLL'"><Link><AdditionalDependencies>yaml-cpp-MDd.lib;%(AdditionalDependencies)</AdditionalDependencies></Link></ItemDefinitionGroup></Project>

I have the following error: "error MSB4191: The reference to custom metadata "RuntimeLibrary" at position 1 is not allowed in this condition "'%(ClCompile.RuntimeLibrary)'=='MultiThreadedDebugDLL'"."

How can I workaround this issue?

MSbuild tag does not work for links

$
0
0

I have the following MSBuild ItemGroup: 

  

<ItemGroup><Content Include="..\..\SomeFolder\**\*.less"><Link>Style\%(RecursiveDir)%(FileName)%(Extension)</Link><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content><Content Include="..\..\SomeFolder\**\*.css"><Visible>False</Visible><Link>Style\%(RecursiveDir)%(FileName)%(Extension)</Link><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></Content>

The Visible attribute seems to not work, since the css files included aren't hidden from the solution explorer.

Errors in VS2013 project build -- MSBuild

$
0
0

I'm trying to use VS2013 and have migrated a project from VSD2010.

The problem is that I am seeing many warnings when I build this project related to the MSBuild Microsoft.Common.CurrentVersion.targets file.  The project actually seems to run, but there are more than 100 warnings all coming from the targets file.

It appears to not fully understand the msbuild XML schema.  

Is maybe http://schemas.microsoft.com/developer/msbuild/2003 not the correct schema?  Or it is missing reference to an XSD file?

I've seen other people complain about seeing similar errors, but I haven't been able to work around it.  I've tried uninstalling and reinstalling.  Some people said close all edit windows and rebuild.

These didn't work for me.

For example:

Warning11 The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'ImportByWildcardBeforeMicrosoftCommonTargets' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Property, AllowUnsafeBlocks, AppConfigForCompiler, ApplicationIcon, ApplicationRevision, ApplicationVersion, AppDesignerFolder, AspNetConfiguration, AssemblyKeyContainerName, AssemblyKeyProviderName, AssemblyName, AssemblyOriginatorKeyFile, AssemblyOriginatorKeyFileType, AssemblyOriginatorKeyMode, AssemblyType, AutoGenerateBindingRedirects, AutorunEnabled, BaseAddress, BootstrapperComponentsLocation, BootstrapperComponentsUrl, BootstrapperEnabled, CharacterSet, CheckForOverflowUnderflow, CLRSupport, UseDebugLibraries, CodePage, Configuration, ConfigurationName, ConfigurationOverrideFile, CreateDesktopShortcut, CreateWebPageOnPublish, CurrentSolutionConfigurationContents, DebugSecurityZoneURL, DebugSymbols, DebugType, DefaultClientScript, DefaultHTMLPageLayout, DefaultTargetSchema, DefineConstants, DefineDebug, DefineTrace, DelaySign, DisableLangXtns, DisallowUrlActivation, CodeAnalysisAdditionalOptions, CodeAnalysisApplyLogFileXsl, CodeAnalysisConsoleXsl, CodeAnalysisCulture, CodeAnalysisFailOnMissingRule....C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets226 Miscellaneous Files


program Build Problem

$
0
0

When I build a program it shows an  Error : "Unable to find manifest signing certificate in the certificate store."






Microsoft.Cpp is missing even after installing windows SDK on windows 8.1

$
0
0

Hi,

I am setting up environment for building hadoop code in windows 8.1. This needs CPP compilers (v120/V110), I installed windows SDK successfully but I still dont see MSBuild/Microsoft.Cpp created. I tried with windows SDK 7 and 8 also. It looks like none showing up this. 

I also don't see developer command prompt for running the builds. 

Any help will be greatly appreciated.

How do I specify in a solution to not to build precompiled applications?

$
0
0
I have some precompiled applications in a solution, how can I configure the solution to skip build of precompiled projects/applications (other than individually selecting the projects to not to build)?

JNI dll problem

$
0
0

Hi everyone,

I think my problem is related to the way I build a dll. That's why I'm posting my question in this category.

My problem looks like this: I need to use a dll in a java application through JNI. I have 2 dll libraries build from EXACTLY the same code. The first one is built by somebody else on another machine and the second one is built by me on my machine.

While the first one works perfectly, the dll built by me fails with this error:

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_UNCAUGHT_CXX_EXCEPTION (0xe06d7363) at pc=0x7c812afb, pid=4260, tid=852
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode windows-x86 )
# Problematic frame:
# C  [kernel32.dll+0x12afb]
#
# An error report file with more information is saved as:
# C:\[..]\hs_err_pid4260.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

 

I could post also the content of the log file but I think it doesn't contain much information.

 

My intuition tells me that there is a problem with the way I build the dll. Specifically with the configuration(C++ compiler/Linker configurations) I use when building the library.

To be more specific, I will give you some of the configuration which I think might have an impact (by the way, I tried changing all of these and set them in different combinations; nothing works):

Optimization: disabled

Preprocessor definitions: WIN32;NDEBUG;_CONSOLE;

Runtime library: multi-threaded

Create/Use precompiled headers: NOT USING PRECOMPILED HEADERS

Enable Incremental Linking: NO

Generate Debug Info: NO

System: Console

 

For completeness, here is the configuration file of the project:

 

<Configuration
            Name="Release|Win32"
            OutputDirectory="Release"
            IntermediateDirectory="Release"
            ConfigurationType="2"
            >
            <Tool
                Name="VCPreBuildEventTool"
            />
            <Tool
                Name="VCCustomBuildTool"
            />
            <Tool
                Name="VCXMLDataGeneratorTool"
            />
            <Tool
                Name="VCWebServiceProxyGeneratorTool"
            />
            <Tool
                Name="VCMIDLTool"
            />
            <Tool
                Name="VCCLCompilerTool"
                Optimization="0"
                AdditionalIncludeDirectories="EXACTLY SAME INCLUDES AS IN THE WORKING DLL"
                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;"
                RuntimeLibrary="0"
                UsePrecompiledHeader="0"
                WarningLevel="3"
                Detect64BitPortabilityProblems="true"
                DebugInformationFormat="3"
            />
            <Tool
                Name="VCManagedResourceCompilerTool"
            />
            <Tool
                Name="VCResourceCompilerTool"
            />
            <Tool
                Name="VCPreLinkEventTool"
            />
            <Tool
                Name="VCLinkerTool"
                LinkIncremental="1"
                GenerateDebugInformation="false"
                SubSystem="1"
                OptimizeReferences="2"
                EnableCOMDATFolding="2"
                TargetMachine="1"
            />
            <Tool
                Name="VCALinkTool"
            />
            <Tool
                Name="VCManifestTool"
            />
            <Tool
                Name="VCXDCMakeTool"
            />
            <Tool
                Name="VCBscMakeTool"
            />
            <Tool
                Name="VCFxCopTool"
            />
            <Tool
                Name="VCAppVerifierTool"
            />
            <Tool
                Name="VCPostBuildEventTool"
            />

        </Configuration>

 

Could you please indicate me what build options to change in order to make this work ?

Thanks in advance!

Error in VS Build: Files has invalid value "

$
0
0

I am having the following errors in my VS build

 

Error 2 Files has invalid value "<<<<<<< .mine". Illegal characters in path.

 

The only info coming out is the Project its associated with, however there is no file with this name.  Any help would be appreciated.  It is a working copy of a subversion controlled project (client is tortoise svn).  But I can't see how this would be cause the problem with the build process?

 

Kind Regards,

Luke Cloudsdale

What is the VSSDKInstall environment variable path

$
0
0

System:

Microsoft Windows 8.1 Pro X64

Visual Studio 2013

Visual Studio 2013 SDK

I have a VS Package (C#) project that builds fine from within Visual Studio. I want to be able to build from the command line. I know that I need tocall "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat" and set the VSSDKInstall environment variable.

What should VSSDKInstall point to?

(I know that "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VSSDK" is not the right path, as that causes the command line to not build and furthermore causes Visual Studio IDE to no longer build.)

Using native x64 build tools for PlatformToolset=v110 in Visual Studio 2013

$
0
0

I have tried the advice given here: https://connect.microsoft.com/VisualStudio/feedback/details/800059/isnativeenvironment-true-no-longer-works-on-visual-studio-2013-rc, and manually adding <PreferredToolArchitecture>x64</PreferredToolArchitecture> to project files works great for VS 2013, so no issues there. 

However, I have to build certain projects using PlatformToolset=v110 (Visual Studio 2012), and prefer to do the development under VS 2013 (single mixed project solution).  The PreferredToolArchitecture property does not work, and build falls back on using the 32-bit compiler stack for these projects. Neither does setting _IsNativeEnvironment=true work. 

Is there a way to use the 64bit build tools this way?  (we have a really large module which sporadically fails at link if 32bit build tools are used)

Thanks


Building a solution using MSBuild from command line Vs inside Visual Studio

$
0
0

Hi, I have a question regarding the difference I have noticed when building a solution file using MSBuild from command line and when doing it inside Visual Studio 2013 Update 4. The solution file I am using contains a lot of projects.

Case: Using MSBuild

In this scenario, after successfully building the solution file, if I try to build it again, then MSBuild notifies me that the projects are up-to-date and it doesn't try to compile any source files, which is evidently the expected behavior. But it actually tries to execute or goes through the targets in the Build step trying to determine whether the Output files are out-of-date. And this occurs for every project that is existent in the solution. Even though it doesn't build the solution again, the process of checking time stamps of files for each project actually takes quite a long time.

Case: Using Visual Studio

When doing it inside Visual Studio, after a successful build, if I try to build the solution again, then it automatically notifies me that the projects are up-to-date. It actually takes few seconds to return this output. Looking at the build output, I noticed Visual Studio doesn't really execute targets to conclude that the projects are up-to-date. So I figured it must be using something different to check the statuses of the projects.

I really want to bridge the performance gap between these two "worlds". I would really appreciate any help or hints in regards to how Visual Studio is performing this check or ways I could implement something similar in MSBuild.

Cheers!

Viewing all 2763 articles
Browse latest View live


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