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

An internal failure occurred while running MSBuild

$
0
0

I am getting below error

MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.

Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: Node 2 does not have a provider.

   at Microsoft.Build.Execution.BuildManager.EndBuild()

   at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, Dictionary`2 globalProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Boolean needToValidateProject, String schemaFile, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, Boolean debugger, Boolean detailedSummary)

Environment details:

This problem is occuring when we build C# solutions with parallel switch enabled using msbuild. This problem is coming in my build server which uses jenkins to build C# solutions on multiple executors of Jenkins.

Visual Studio Version: VS2013,

Msbuild version: 2012

This problem has come with Windows 2012R2 and Windows 7 with 4 cores and 4GB RAM. Also note that the issue is not frequent. It is happening once in 10 times.

Please help me in resolving this issue.


Using the Microsoft help icon (?) in a customised tab integrated in the help menu

$
0
0

I am using the Visual Studio and customizing it for my company. I want to use their help icon in a tab in the help menu which is personalized and integrated with the Visual studio build. I am unable to find the image (?) used. Can anyone help me in locating the image and how to reference it so that I can use it for my integrated menu.

Xcopy is not recognized as internal or external command, Visual studio 2013 post build event

$
0
0

There is an xcopy command to copy certain files in visual studio post build event in solution i am currently working on. This solution builds without any problem on TFS server but when i am trying to build it locally i am getting following error

'xcopy' is not recognized as an internal or external command, operable program or batch file.

I checked my path and it is as mentioned below

C:\Program Files (x86)\Apache Software Foundation\apache-maven-3.2.3\bin; C:\Windows\system32\WindowsPowerShell\v1.0\; C:\Windows\System32\WindowsPowerShell\v1.0\; %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\; %systemroot%\System32\xcopy; %SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem;


error ASPRUNTIME: Object reference not set to an instance of an object.in Visual Studio in method CopyPrecompiledFile.

$
0
0

Hello, I have this issue and Ihave wasted atleast 2 days with this one. I have tried all possible solutions -

1. Turn Off Real time McAffee scanning  -- I do not have real time scanning ON
2. Delete Bin folder and start all over by adding references -- Did not work
3. delete .compiles or refresh filesdelete temp files from asp.net temp files folder -- no .Compiled file. Deleted refresh files but no use
4. change temp file for appliation in compilation tag of web config -- No use

My application framework is .NET 4.5 and VSD 2012. I have tried to compile from C:\WINDOWS\Mi
crosoft.NET\Framework folder as well as C:\WINDOWS\Mi
crosoft.NET\Framework64 folder. Both gave same error.

I need urgent assistance plz.

Here is stack trace :

C:\Development\Convergence\Applications\CAP\WixSetup\WixSetupView>"C:\WINDOWS\Mi
crosoft.NET\Framework\v4.0.30319\aspnet_compiler.exe" -u -fixedNames -p "C:\Deve
lopment\Convergence\Applications\CAP\TouchPointTier\Presentations" -v / "C:\Deve
lopment\Convergence\Applications\CAP\PrecompiledWeb\ConvergenceCAP" -errorstack

Microsoft (R) ASP.NET Compilation Tool version 4.0.30319.17929
Utility to precompile an ASP.NET application
Copyright (C) Microsoft Corporation. All rights reserved.

error ASPRUNTIME: Object reference not set to an instance of an object.

[NullReferenceException]: Object reference not set to an instance of an object.
   at System.Web.Compilation.BuildManager.CopyPrecompiledFile(VirtualFile vfile,
 String destPhysicalPath)
   at System.Web.Compilation.BuildManager.CopyStaticFilesRecursive(VirtualDirect
ory sourceVdir, String destPhysicalDir, Boolean topLevel)
   at System.Web.Compilation.BuildManager.CopyStaticFilesRecursive(VirtualDirect
ory sourceVdir, String destPhysicalDir, Boolean topLevel)
   at System.Web.Compilation.BuildManager.CopyStaticFilesRecursive(VirtualDirect
ory sourceVdir, String destPhysicalDir, Boolean topLevel)
   at System.Web.Compilation.BuildManager.CopyStaticFilesRecursive(VirtualDirect
ory sourceVdir, String destPhysicalDir, Boolean topLevel)
   at System.Web.Compilation.BuildManager.PrecompileAppInternal(VirtualPath star
tingVirtualDir, IEnumerable`1 excludedVirtualPaths)
   at System.Web.Compilation.BuildManager.PrecompileApp(VirtualPath startingVirt
ualDir, IEnumerable`1 excludedVirtualPaths)
   at System.Web.Compilation.BuildManager.PrecompileApp(ClientBuildManagerCallba
ck callback, IEnumerable`1 excludedVirtualPaths)
   at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCa
llback callback, List`1 excludedVirtualPaths)
   at System.Web.Compilation.BuildManagerHost.PrecompileApp(ClientBuildManagerCa
llback callback, List`1 excludedVirtualPaths)
   at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuil
dManagerCallback callback, Boolean forceCleanBuild)
   at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuil
dManagerCallback callback)
   at System.Web.Compilation.Precompiler.Main(String[] args)

C:\Development\Convergence\Applications\CAP\WixSetup\WixSetupView>pause
Press any key to continue . . .

IVsBuildableProjectCfg FastUpToDateCheck

$
0
0

I building my C++ project using IVsBuildableProjectCfg.StartBuild but some times I see that the build is being skipped even some of my custom tasks need to be run, I think that is caused by the FastUpToDateCheck and my custom task not playing nice with it

------ Build started: Project: ConsoleApplication3, Configuration: Debug Win32 ------
Build started 23/04/2015 19:49:09.
Building with tools version "4.0".
Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully.
Target "Build" skipped. Previously built successfully.

Build succeeded.

Time Elapsed 00:00:00.00
------ Build succeeded ------

I try to set DisableFastUpToDateCheck as suggested in the Performance Shortcuts section of this page but doesn't seems to work for my case.

Building works fine when using the build menu, but is being skipped when build with IVsBuildableProjectCfg, any ideas on how to overcome this?

Maybe is there a way to disable the check from the extension, or a way to the this check that build is required. 

Regards,

Jose

Error_154_Unknown build error, 'Binary format of the specified custom attribute was invalid.' _C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets_343

$
0
0

The compiler when set to diagnostic verbosity points to C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets    line 343

I do not recommend this, but I commented out MarkupCompilePass2 and it built, but WPF objects were not built.  This is line 343:

<MarkupCompilePass2               AssemblyName="$(AssemblyName)"                OutputType="$(OutputType)"                Language="$(Language)"                LocalizationDirectivesToLocFile="$(LocalizationDirectivesToLocFile)"               RootNamespace="$(RootNamespace)"                References="@(ReferencePath);@(AssemblyForLocalTypeReference)"                KnownReferencePaths="$(MSBuildBinPath);$(TargetFrameworkDirectory);@(_TargetFrameworkSDKDirectoryItem);@(KnownReferencePaths)"               AssembliesGeneratedDuringBuild="@(AssembliesGeneratedDuringBuild)"               AlwaysCompileMarkupFilesInSeparateDomain="$(AlwaysCompileMarkupFilesInSeparateDomain)"               XamlDebuggingInformation="$(XamlDebuggingInformation)"               GeneratedBaml=""                OutputPath="$(IntermediateOutputPath)"               ContinueOnError="false" >

If I remove one of 2 projects from the references, it builds.  The 2 projects were copies of each other with some renaming.  Both projects do not have WPF, but the master project does.  How can I have both projects referenced and not get the titled error?


Determining the MsBuild executable for a given Visual Studio version

$
0
0

Is there a way to match a given Visual Studio version to a path to the MsBuild executable that will be used for a project? I have a tool to run PC-Lint as part of the building of a driver under the WDK that integrates with Visual Studio. The challenge here is that I need to be able to execute the correct MsBuild when I encounter VS2012, VS2013 and VS2015. For VS2012 and VS2013 my install tool was able with a little hard coded logic handle the two versions. I did not like having the "special case" but it worked, but things are looking more complex with VS2015 and I really wanted to get rid of the special case code anyway.

So in a nutshell, is there a way if I see VS201n (where n is 2,3 or 5) is installed, to determine the path to the MsBuild that will be executed by default in the system I am installing on for an MsBuild project?


Don Burn Windows Driver Consulting Website: http://www.windrvr.com

T4 text templating working when directly starting TextTransform.exe but not when clicking Run Custom Tool in VS

$
0
0

I have a project where I have thw following build Event:

"%CommonProgramFiles(x86)%\microsoft shared\TextTemplating\12.0\TextTransform.exe" "$(ProjectDir)Properties\AssemblyInfo.tt

This works perfectly fine and transforms AssemblyInfo.tt incrementing the version number. When I try to transform the exact same file from Visual Studio 2013 via Run Custom Tool this error shows up and the template is not transformed:

The custom tool 'TextTemplatingFileGenerator' failed.  Could not load type 'Microsoft.VSDesigner.WCFModel.IWcfClientGenerationExtension' from assembly 'Microsoft.VSDesigner, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.



How to read the registry value as wild card

$
0
0

I am supposed to read a registry value in msbuild. But the Registry value will be suffixed by the version number ex.,( HomePage,123).

Is there a way to read the registry value like  $(registry:HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\WebBrowser@HomePage*) without hardcoding the version number?

Thanks in advance.

Run time exception while running the compiled binaries on VS2008

$
0
0
Hi,

I am compiling the source code and the compilation is successful. When I run the binaries on the machine on which I had compiled the source code, it runs fine. But when I run the same binaries on the other machine on which VS2008 is not installed, it shows an exception. (The application was unable to start correctly(0xc0150002). Click OK to close the application)

I have checked the dependency using the tool dependency walker and it shows all the dependency as resolved.
I have already installed the CRT redistributable and  .net framework 3.5 in the machine, but it still shows the same  error.
Please let me know what I need to do.

Regards
Amol

Custom Solution And Project Platforms

$
0
0

Hello all.  I have created a custom VSPackage and Project Type that exposes custom Project Platforms (x86, x64).  My problem appears to be multiple things at once.

1.) When I open the Configuration Manager and try to bind aSolution Platform to a Project Platform, it doesn't persist.  As soon as I change the current Project Platform drop-down, my binding gets erased.

2.) Even though my Project and Solution does not contain the AnyCPU Platform dropdown anywhere, When trying to build the project, the$(Platform) variable in MSBuild has the value "AnyCPU" when it actually should reflect whatever platform is selected in the Solution Platform drop-down (x86, x64).

Here is my code implemented custom Project Platforms:

using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Project;
using Microsoft.VisualStudio.Shell.Interop;
using System.Runtime.InteropServices;

namespace PSE.VisualLinux
{
	[ComVisible(true)]
	class LinuxProjectConfigProvider : ConfigProvider
	{
		enum EConfig
		{
			Debug = 0,
			Release
		}

		enum EPlatform
		{
			x86 = 0,
			x64
		}

		public LinuxProjectConfigProvider(ProjectNode projNode) :
			base(projNode)
		{

		}


		public override int GetCfgProviderProperty(int propid, out object var)
		{
			var = false;
			switch ((__VSCFGPROPID)propid)
			{
				case __VSCFGPROPID.VSCFGPROPID_SupportsCfgAdd:
					var = true;
					break;

				case __VSCFGPROPID.VSCFGPROPID_SupportsCfgDelete:
					var = true;
					break;

				case __VSCFGPROPID.VSCFGPROPID_SupportsCfgRename:
					var = true;
					break;

				case __VSCFGPROPID.VSCFGPROPID_SupportsPlatformAdd:
					var = true;
					break;

				case __VSCFGPROPID.VSCFGPROPID_SupportsPlatformDelete:
					var = true;
					break;
			}
			return VSConstants.S_OK;
		}

		public override int GetPlatformNames(uint celt, string[] names, uint[] actual)
		{
			if (celt == 0)
			{
				celt = 2;
				names = new string[2];
			}

			for (int i = 0; i < celt; i++)
			{
				names[i] = ((EPlatform)i).ToString();
				if (i == 1)
					break;
			}
			if (actual != null)
				actual[0] = celt;
			else
				actual = new uint[1] { celt };
			return Microsoft.VisualStudio.VSConstants.S_OK;
		}

		public override int GetSupportedPlatformNames(uint celt, string[] names, uint[] actual)
		{
			if (celt == 0)
			{
				celt = 2;
				names = new string[2];
			}

			for (int i = 0; i < celt; i++)
			{
				names[i] = ((EPlatform)i).ToString();
				if (i == 1)
					break;
			}
			if (actual != null)
				actual[0] = celt;
			else
				actual = new uint[1] { celt };
			return Microsoft.VisualStudio.VSConstants.S_OK;
		}
	}
}

Here is my custom Project Type Template:

<?xml version="1.0" encoding="utf-8" ?><Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><UsingTask TaskName="PSE.VisualLinux.LinuxTask" AssemblyFile="C:\Users\guita_000\Documents\visual studio 2015\Projects\VisualLinux\VisualLinux\bin\Debug\VisualLinux.dll"></UsingTask><PropertyGroup><ProjectGuid>$guid1$</ProjectGuid></PropertyGroup><PropertyGroup><Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration><Platform Condition=" '$(Platform)' == '' ">x86</Platform></PropertyGroup><PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'"><RemotePort>22</RemotePort><RemoteIP>0.0.0.0</RemoteIP><RemoteUserName>user</RemoteUserName><RemotePassword>pass</RemotePassword></PropertyGroup><PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"><RemotePort>22</RemotePort><RemoteIP>0.0.0.0</RemoteIP><RemoteUserName>user</RemoteUserName><RemotePassword>pass</RemotePassword></PropertyGroup><PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'"><RemotePort>22</RemotePort><RemoteIP>0.0.0.0</RemoteIP><RemoteUserName>user</RemoteUserName><RemotePassword>pass</RemotePassword></PropertyGroup><PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"><RemotePort>22</RemotePort><RemoteIP>0.0.0.0</RemoteIP><RemoteUserName>user</RemoteUserName><RemotePassword>pass</RemotePassword></PropertyGroup><ImportGroup></ImportGroup><Target Name="Build"><LinuxTask Type="Build" Configuration="$(Configuration)" Platform="$(Platform)" /></Target><Target Name="Rebuild"><LinuxTask Type="Rebuild" Configuration="$(Configuration)" Platform="$(Platform)" /></Target><Target Name="Clean"><LinuxTask Type="Clean" Configuration="$(Configuration)" Platform="$(Platform)" /></Target><Target Name="GetFrameworkPaths" /><Target Name="ResolveAssemblyReferences" /></Project>

I really hope someone can help me solve these issues.  Thank you for you time and attention.


Difference Between Postbuild and AfterBuild Event

$
0
0

Hi, 

Is there any difference between using postbuild events and Afterbuild events in .CSProjects.?

Thanks

Bobby

MSBUILD - Using MSBUILD I would like to add files into the solution AFTER BUILD process.

$
0
0

Hi,I have the requirement to add files into the project after project has been build. I wish to add some javascript and css files into the project at the PRE BUILD or POST BUILD time.  I specified <Content Include="path\filename"/> in the AFTERBUILD Target element. But it seems not including the files.

Regards,

Senthil

Build errors when converting windows application in c# .net 3.5 to 4.5 in visual studio

$
0
0

Hi All,

      I am getting following error when I am building a windows application solution module wise after converting the code in to c# .net 3.5 to 4.5 in visual studio.

evn though I have imported system.data and I am getting error related to datasets i.e designer pages also.

Error 9 The command "cd "C:\softwares\application1 Copy\src\ServiceInterface\CodeGen"
REM watch for the extra slash after /output:"C:\softwares\application1 Copy\src\" this is needed due to some bug in .NET command line args parsing.

"C:\softwares\application1 Copy\src\..\Tools\AgentGen\Release\AgentGen.exe" /assembly="C:\softwares\application1 - Copy\src\bin\Debug\contracts.dll" /output="C:\softwares\application1 Copy\src\\" /definition="C:\softwares\application1 - Copy\src\ServiceInterface\CodeGen\GenerationDefinition.xml"" exited with code 1. Services.Contracts



MSB4014 error

$
0
0
I am using VS 2010 and have built c++ projects many times from the IDE.  For some reason, when I tried to build one today, I got the dreaded MSB4014 error, saying that MSBuild.exe could not be launched because it couldn't be found at the location"C:\Windows\Microsoft.NET\Frameword\v4.0.30319\MSBuild.exe, even though the file is at exactly that location.  There have been some solutions posted, one related to user names > 19 characters (doesn't apply) and one to setting the environment variable MSBUILD_EXE_PATH to the exact path.  I have been fumbling around trying to figure out how to set that in the IDE with no luck.  But I'm wondering why I should have to set this if I have been previously able to build my c++ projects in VS 2010 and now out of the blue I'm getting this error?  I still want to be able to build my c++ projects from the IDE, I don't want to have to build from a command line.  Any help would be greatly appreciated.

genush


Which one should use to develop cross platform apps

$
0
0

Hello,

There is a Xamarin studio and visual studio.

Which one should use to develop an app?

Xamarin studio?

Visual Studio?

Help needed.

Problem with downloading files from sites.

$
0
0

Hi guys,

I was trying to do "updater" for my program, but when I upload TXT document to site I just download html code (?) like this http://pastebin.com/BeWwMXp2 and I don't know how to download TXT document. There is my "updater" http://pastebin.com/ciKYpWv6.

Sorry for my English.

DevEnv.com does nothing

$
0
0

Hi,

We have an SSIS project in our solution and to automate the build using MSBuild, we are using a project task which invokes devenv.com to compile the solution and copy ".ispac" file to a folder.

Below is the script mentioned in .proj file which is compiled by MSBuild

<Target Name="SSISBuild"><PropertyGroup><DEVENV>C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.com</DEVENV><SSISProjPath>../ProjectFolder/MySolution.sln</SSISProjPath></PropertyGroup><Exec Command="&quot;$(DEVENV)&quot; &quot;$(SSISProjPath)&quot; /build Release /Project ProjectName"/></Target>

It is working fine most of the time, but sometimes our build stops at this step, which invokes devenv.com and does not exit. I even tried to append the output of devenv command using:

/out c:\temp\SSISProj.log

But all it does is start the process and logs:

------ Build started: Project: ProjectName, Configuration: Release------

Please help me to resolve this, I see the process has started but it is not performing any operation.

MSB6006: cmd.exe exited with code 1

$
0
0

Hi guys..

 

am trying to work on some application to create socket and stuff... It uses some service which n all.. code is done in c++... and when i build it throws error msb6006.

i tried running the project in visual studio 2005 but the code doesn't support anything but VS2010. error seems somewhere here in microsoft.CPPcommon.targets

Snippet

<PropertyGroup Condition="'$(CustomBuildAfterTargets)'!='' or '$(CustomBuildBeforeTargets)'!=''">
    <CustomBuildToolBeforeTargets> $(CustomBuildBeforeTargets)</CustomBuildToolBeforeTargets>
    <CustomBuildToolAfterTargets> $(CustomBuildAfterTargets)</CustomBuildToolAfterTargets>
  </PropertyGroup>

  <!--If no before/after targets are set, then set the default-->
  <PropertyGroup Condition="'$(CustomBuildAfterTargets)'=='' and '$(CustomBuildBeforeTargets)'==''">
    <CustomBuildToolBeforeTarget s> Midl</CustomBuildToolBeforeTargets>
    <CustomBuildToolAfterTargets> PreBuildEvent</CustomBuildToolAfterTargets>
    <CustomBuildBeforeTargets> PostBuildEvent</CustomBuildBeforeTargets>
    <CustomBuildAfterTargets> BscMake</CustomBuildAfterTargets>
  </PropertyGroup>

CustomBuildToolBeforeTarget
s this tag has some problem and thats the reason buld fails... have tried out evrything available on google but its still the same..

i would really appreciate any help on this..thank you.

Error - unable to load manifest designer

$
0
0

I am using the VS2015 RC- When I create a Windows Store app project, when I click Package.appxmanifest in the Solution Explorer, I receive the message "Unable to Load Manifest Designer. The Manifest Designer cannot load because one of the files has errors."

I have not changed any code - this occurs on any fresh project when opening the Package.appxmanifest.

Viewing all 2763 articles
Browse latest View live


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