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

MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(3243,9): error MSB4094

$
0
0

Hello,

After open my VS Ultimate 2012 C# solution in VS Ultimate 2013 12.0.21005.1REL I get the following warning:

Warning 1 Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190. EnergyMS

I follow the Microsoft link instructions. Then I edited the csproj file, adding the following line:


<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

When I build the solution again, I get the following error:


Error List
 "app.config;obj\x86\Debug\EnergyMS.csproj.EnergyMS.exe.config" is an invalid value for the "ConfigFile" parameter of the "GenerateApplicationManifest" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem". EnergyMS

Output Window:
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(3243,9): error MSB4094: "app.config;obj\x86\Debug\EnergyMS.csproj.EnergyMS.exe.config" is an invalid value for the "ConfigFile" parameter of the "GenerateApplicationManifest" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem".

I've seen similar threads in fórum, but I don't understand the problem...

Can anyone help me understand the problem?

Thank you.


Building groups of DLL's

$
0
0

I have used Solution sets to group projects in my solution. I would like to set the build so that it builds each set in a specified sequence. the only way I have found to do this is to have each set contain a DLL which is dependent on the build of all of the other projects in the set and which must be build before proceeding to the next set.

Is ther a better way?

MSBuild Custom Resources Filename

$
0
0

Hi,

I have the following files structure:

  • WebApplication\index.en-au.resx
  • WebApplication\index.en-us.resx
  • WebApplication\Profile\index.en-au.resx
  • WebApplication\Profile\index.en-us.resx

I would like to use "GenerateResource" MSBuild task to generate:

  • Artifacts\en-au\
    • WebApplication.index.resource
    • WebApplication.Profile.index.resource
  • Artifacts\en-us\
    • WebApplication.index.resource
    • WebApplication.Profile.index.resource

Could you please let me know how this can be done?

Thanks in advance.

Is there a way to detect the compiler version or visual studio update version from MSBuild?

$
0
0

I'd like to make use of new compiler flags introduced in VS2013 Update 2 (RC currently). I don't want to generate warnings for anyone that doesn't have it installed, so I was wondering if there was a good way to detect the compiler version or the fact the update is applied from MSBuild?

Thanks

MSB4018 Out of Memory Exception

$
0
0

Hi,

Could someone please point me in the right direction regarding this error message that we seem to get all too often.
It says that I'm out of memory, but I fail to see how. The machine is equiped with 3GB of mem, according to task manager there is approx. 1,2GB still free (and about 6GB of virt.mem) and devenv.exe is sitting at about 750MB of allocated mem.

Restarting Visual Studio solves the problem, but it just takes a few hours then we are back at the same point. Its not just me having this problem, its the whole dev.team.

Something inside VS seems to be eating up the memory.

The version of VS is: Microsoft Visual Studio 2005 Professional Version 8.0.50727.762  (SP.050727-7600) with SP1

Thankful all hints regarding this.

The "ResolveAssemblyReference" task failed unexpectedly.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at Microsoft.Build.Shared.ExceptionHandling.RethrowUnlessFileIO(Exception e)
   at Microsoft.Build.Tasks.ReferenceTable.SetPrimaryFileItem(ITaskItem referenceAssemblyFile)
   at Microsoft.Build.Tasks.ReferenceTable.SetPrimaryItems(ITaskItem[] referenceAssemblyFiles, ITaskItem[] referenceAssemblyNames, ArrayList exceptions)
   at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute(FileExists fileExists, DirectoryExists directoryExists, GetDirectories getDirectories, GetAssemblyName getAssemblyName, GetAssemblyMetadata getAssemblyMetadata, GetRegistrySubKeyNames getRegistrySubKeyNames, GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, GetLastWriteTime getLastWriteTime)
   at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute()
   at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound)

Regards,
Mikael

debugsymbols to true

$
0
0

Hi everyone

all my [cs|vb]proj files import a custom targets file.  In here I want to override <DebugSymbols/> irrespective of which $(Configuration)|$(Platform) I am compiling.  (To save me the effort of setting it in every new project which gets created.)

I've tried setting this property inside and outside of a target in my custom targets file.

And I've tried tacking a target onto BeforeTargets="CoreCompile" - and setting it there.

In both cases it is getting set - as I can Message it out later.

What I want, of course is for CoreCompile to always set /debug:full when it constructs the call to [vbc|csc].exe.

But I just can't seem to get .pdbs if I set <DebugSymbols>false</DebugSymbols> in a projects's Release configuration.

Just can't seem to do it.

Anyone got any ideas, please?

N

How to force disable Frame-Pointer Omission (/Oy-) with Max Speed Optimization (/O2) enabled in Release version (vs2008 sp1)

$
0
0

I turned off FPO manually(/Oy–) in vs2008 ,but it has no effect and my code still omits frame pointers in release version.

then i foundevery thing was OK when the same project was  compile in vs2010, frame pointers were all kept.But i need to do this in vs2008. The only way to make it work in vs2008 is to switch to /Od instead of/O2 which will slow down the progam heavily.

Does any one know how to fix this? thanks!!!


Using XmlPoke with a value containing semicolon

$
0
0

Hello Guys,

I am using XmlPoke to set connection string into config file.

But as it contains semicolons so MSBuild fails saying about multiple parameters being passed, I did some research on internet and foudn that we can use %3B for semicolons. But when I used this, XMLPoke worked but now where I was expecting semicolons I have %3B. Which is not what I want.

Has anyone else faced similar problem?

Please advise.

reagrds,


Software Engineer


MSBuild : Command line succeeds but TFSBuild fails

$
0
0

For TFSBuild, till now I was using devevn. But now I am trying to use MSBuild instead. So, I have updated my .proj file as below,

<TargetName="AfterCompile"><ExecCommand="C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild &quot;$(SolutionRoot)\SomePath\SomeSolution.sln&quot; /p:Configuration=Release"/>

In build log I am getting below errors :

...\Tools\Paraffin.exe' is not recognized as an internal or external command, operable program or batch file.

for paraffin.exe I have passed a relative path as an argument, but it is not showing up in log.

error MSB3073: The command "copy "C:\Projects\Builds... for pre-build event. I verified that source file is there at location, but still copying fails.

I am wondering why it is working with command line but not with TFSBuild.

Contradiction in 'MSBuild Items' documentation?

$
0
0

There seems to be a contradiction in the documentation for 'MSBuild Items' (http://msdn.microsoft.com/en-us/library/ms171453.aspx):

The paragraph 'Creating Items in a Project File' states: You can’t remove an item from an item type during the evaluation phase of a build.

Yet in the paragraph 'Remove attribute' I find this: Items in an ItemGroup of a target may contain theRemove attribute, which removes specific items (files) from the item type.

I would hence expect that this removes all '.res' files from the 'Lib' item type:

<Target Name="PreLinkEvent"><ItemGroup><Lib Remove="*.res" /></ItemGroup></Target>

But this is not the case (which I can see by making an inline task display the items).

Did I get something wrong here?

BTW: How is the 'Lib' item type created?

API which doesnot use window class and helps in detecting Media Inserted/Removed?

$
0
0

Hi I am using VS2010

My requirement is that I want some code snippet or API (if so)  to detect the insertion of Media or Removal of Media along with drive letter without using any window class...

Say I have already implemented using ShellNotifyRegister function and as well Wndproc function for getting window messages in both cases I have to register a window class.

But Please help to detect media ( specially USB ) in console application of VS2010 without registering a window class.

Do we get some API ?


renukumarisharma

Is there a way to get the msbuild Link proerties ?

$
0
0

Hello i am trying to get file name specified in vcxproj  in the <Link> <MergedIDLBaseFileName>

Is there  a way of getting this property - i dont want to change it just read and use the result as condition.

Thanks

I have tried the following $(MergedIDLBaseFileName) @(MergedIDLBaseFileName) both get an empty string (it is not empty i know)

Visual studio solution build failed without showing the reason.

$
0
0

My problem is I cannot build my projects in Visual Studio 2013 without getting any specific error or message. First, when I open the solution, it works for a while and I can debug it. But after a while, it doesn't build my solution and just a failure beep can be heard. I tried to build the solution with MSBuild and it worked fine, but if I want to build and debug inside VS2013, it doesn't work. I have to close the solution and open it again. I searched online and found this solution , but this one doesn't work for me. I had the same problem with 2012. My guess is it is something related to extensions I installed, although all of them are popular and stable. Please help me!

Can't deploy composite project because of database locking

$
0
0

I have a solution of database projects 2 of which constitute a composite project. I followed a walk-through here:http://msdn.microsoft.com/en-us/library/dd193415.aspx which seemed quite clear and I'm pretty sure I did all the steps.

I created the composite because database A referred to lots of objects in database B and database B used one table in database A. I separated out that one table into a project then set my build order to single table Database A, Database B then Rest of Database A.

The build works OK but during deploy when it hits that final project I get first a warning about source and target object versions being different then it fails because it tries to lock the database exclusively to update the collation.

I guess I don't want the second deploy to the same database making those changes as they are unnecessary but I couldn't find any obvious setting to prevent that. Is the only way to deploy to a script which I then modify manually?


Nick Ryan SQL Server Developer OnePath (NZ) Ltd


OverwriteReadOnlyOuputFiles T4 option not working ?

$
0
0

Hello,

This follows thread http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/b4f9efe5-90e7-4cea-8f69-664a3a4df020.

In short, I use the following in my csproj file :

  <PropertyGroup>
    <TransformOnBuild>true</TransformOnBuild>
    <OverwriteReadOnlyOuputFiles>true</OverwriteReadOnlyOuputFiles>
    <TransformOutOfDateOnly>false</TransformOutOfDateOnly>
  </PropertyGroup>

The problem is that, despite the presence of OverwriteReadOnlyOuputFiles, I still get the error message "One or more output files were read-only".

Thanks in advance for any help / idea,

JP


MS build arguments to compare the build output to the target database ex. TORDBD35

$
0
0

Hello there, i'm using TFS 2010 and VS 2012. I need an MS build argument to compare build server output to compare with target database ex. TORDBD35 but needs to be done without deploying it. I've to use this build definition for regression testing environment. Just created the build definition, but MS build argument line is empty. I'm confused what to fill in it for comparing to target database without need to deploy it in automated build. Please help me out with relevant MS build argument and any deployment script if it is generated through it.

Thanks

T.Uday

SignFile System.NullReferenceException error

$
0
0

I have the following code in my TFSBuild.proj file. The person kicking off the build supplies the version number, for example: /p:MyVersion=1.2.3.4

   <PropertyGroup>
           <Thumbprint>1234567890abcde12345678909abcde123456789</Thumbprint>
   </PropertyGroup>
   <Target Name="ClickOnce" Condition=" '$(MyVersion)'!='' ">
    <ItemGroup>
      <EntryPoint Include="$(DropLocation)\$(BuildNumber)\Debug\TestWpfApplication.exe" />
      <Dependency Include="$(DropLocation)\$(BuildNumber)\Debug\**\*.exe;$(DropLocation)\$(BuildNumber)\Debug\**\*.dll" Exclude="@(EntryPoint)" />
      <File Include="$(DropLocation)\$(BuildNumber)\Debug\**\*.*" Exclude="@(EntryPoint);@(Dependency)" />
    </ItemGroup>
           <GenerateApplicationManifest
               EntryPoint="@(EntryPoint)"
        Dependencies="@(Dependency)"
        AssemblyVersion="$(MyVersion)"
        Files="@(File)">
               <Output
                   ItemName="ApplicationManifest"
                   TaskParameter="OutputManifest"/>
           </GenerateApplicationManifest>
   <Message Text="%(ApplicationManifest.FullPath)" />
   <Message Text="$(Thumbprint)" />
   <ItemGroup>
    <SignTarget Include="%(ApplicationManifest.FullPath)" />
   </ItemGroup>
   <Message Text="@(SignTarget)" />
           <SignFile
               CertificateThumbprint="$(Thumbprint)"
               SigningTarget="@(SignTarget)"/>
   </Target>
   <Target Name="AfterDropBuild" DependsOnTargets="ClickOnce"/>
   </Project>

All of the messages return what I expect and the application manifest looks good. The problem is that the SignFile task returns a NullReferenceException. Here is the log file output:

Target "ClickOnce" in file "D:\BL\72\BuildType\TFSBuild.proj" from project "D:\BL\72\BuildType\TFSBuild.proj":
Using "GenerateApplicationManifest" task from assembly "Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "GenerateApplicationManifest"
Done executing task "GenerateApplicationManifest".
Task "Message"
D:\BL\72\BuildType\TestWpfApplication.exe.manifest
Done executing task "Message".
Task "Message"
1234567890abcde12345678909abcde123456789
Done executing task "Message".
Task "Message"
D:\BL\72\BuildType\TestWpfApplication.exe.manifest
Done executing task "Message".
Using "SignFile" task from assembly "Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "SignFile"
D:\BL\72\BuildType\TFSBuild.proj(255,9): error MSB4018: The "SignFile" task failed unexpectedly.
D:\BL\72\BuildType\TFSBuild.proj(255,9): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
D:\BL\72\BuildType\TFSBuild.proj(255,9): error MSB4018: at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.SignFile(X509Certificate2 cert, Uri timestampUrl, String path)
D:\BL\72\BuildType\TFSBuild.proj(255,9): error MSB4018: at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.SignFile(String certThumbprint, Uri timestampUrl, String path)
D:\BL\72\BuildType\TFSBuild.proj(255,9): error MSB4018: at Microsoft.Build.Tasks.SignFile.Execute()
D:\BL\72\BuildType\TFSBuild.proj(255,9): error MSB4018: at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
Done executing task "SignFile" -- FAILED.
Done building target "ClickOnce" in project "TFSBuild.proj" -- FAILED.
Done Building Project "D:\BL\72\BuildType\TFSBuild.proj" (EndToEndIteration target(s)) -- FAILED.
Deferred Messages
Overriding target "SatelliteDllsProjectOutputGroup" in project "C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets" with target "SatelliteDllsProjectOutputGroup" from project "C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.WinFX.targets".

Build FAILED.

"D:\BL\72\BuildType\TFSBuild.proj" (EndToEndIteration target) (1) ->
(ClickOnce target) ->
D:\BL\72\BuildType\TFSBuild.proj(255,9): error MSB4018: The "SignFile" task failed unexpectedly.
D:\BL\72\BuildType\TFSBuild.proj(255,9): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
D:\BL\72\BuildType\TFSBuild.proj(255,9): error MSB4018: at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.SignFile(X509Certificate2 cert, Uri timestampUrl, String path)
D:\BL\72\BuildType\TFSBuild.proj(255,9): error MSB4018: at Microsoft.Build.Tasks.Deployment.ManifestUtilities.SecurityUtilities.SignFile(String certThumbprint, Uri timestampUrl, String path)
D:\BL\72\BuildType\TFSBuild.proj(255,9): error MSB4018: at Microsoft.Build.Tasks.SignFile.Execute()
D:\BL\72\BuildType\TFSBuild.proj(255,9): error MSB4018: at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)

I have tried all that I know to attempt to resolve this issue. I even got an unreleased hotfix associated with MSB4018 - no luck. Does anyone have any ideas?


James Bristow, Developer/Software Configuration Manager

Trigger BeforeBuild task for each Project in the Solution

$
0
0

Hi All,

I have a requirement to check for some "BeforeBuild" criteria for each project in the solution.

I am having a custom task to test those criteria and I can modify each project file in the solution like this:

<UsingTask AssemblyFile="$(MSBuildProjectDirectory)\..\Examples.Tasks.dll"

TaskName="MyTask" />

<Target Name="BeforeBuild">

    <MyTask />

</Target>

But that will require the change of all project files and any project created after that has to follow the same changes.

Can I achive the same thing with out having to change the individual projet files?

Thanks!

How to correct CheckRemoteFx45 and UsingTask declaration?

$
0
0

Hi, I'm hoping someone can help me interpret this error:

Error 1 The "CheckRemoteFx45" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.Tasks.dll.  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.  0 0 forms

I received it when I tried to publish a simple web forms application to the azure website, from the Visual Studio 2013 Virtual Machine. The application runs on local host, and I downloaded publishing settings from the azure website. I'm unfamiliar with the UsingTask declaration, so I'd like help to locate and correct this declaration.

WiX - Converting WixLib Files to Individual MSIs

$
0
0

Hello,

I am kindly seeking urgent help to transform WixLib files to MSI. The background to this requirement was that a few months ago a decision was taken in my company to consolidate all system features into a single MSI artefact, rather than maintain each as a discrete deliverable. The consolidated set of artefacts, with their own *.wixobj and *.wixlib files, are generally then built into a single MSI file in Visual Studio 2012 for deployment to various environments including Production.

We've however now decided to maintain all features independently and therefore wish to generate individual MSIs for each. The problem we currently face however is that we're finding it quite a challenge transforming our deployment artefact or Wix project from a WixLib project to a standard MSI project. Any advise or assistance on this would therefore be greatly appreciated.

Thank you.

Reg

Viewing all 2763 articles
Browse latest View live


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