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

MSBuild web.config transformations and publishing Web App to Azure

$
0
0

I have raised this originally in the TFS support forums (with the same title) but was directed to this forum as a more appropriate one.

I have an ASP.NET MVC application published to Azure Web APP from VS2013 using a publish profile with Configuration settings set to Debug to apply web.config transformations.

This all works fine (including the transformations) when done from Visual Studio (right click project and choose publish profile).

I also have a nightly build for this application's solution on TFS 2013 build server which I am trying to enhance to include deploying the site to Azure. For this I am using MsBuild arguments in the Default Build Template as

/p:VisualStudioVersion=12.0 /p:DeployOnBuild=True /p:PublishProfile="abhayavacanaadminreview - Web Deploy.pubxml"  /p:UserName=$***  /p:Password=*******************************

The build performs the deployment fine, however, the web.config transformations relating to Debug configurationdo not happen (so connection strings to new DB still point to the local DB).

Is there anything I can do here with the arguments to MsBuild to enforce those transformations to happen or do I need a completely different approach to this to support my Continuous Integration process?


insula_dev


Deploy 72002 - Unable to connect to master or target server

$
0
0

Hi Folks,

  I am trying to use TFS Build to build and deploy a Visual Studio Database project using a publish.xml file.   I can build and deploy the project in Visual Studio by right clicking and choosing publish then selecting the profile.

When I use TFS Build, it is building the project but the deploy is failing with the error Deploy 72002 - Unable to connect to master or target server 'abcde'.  You must have a user with the same password in master or target server.

The value of abcde is set to the database name, not the server.

My msbuild arguments are: /p:VisualStudioVersion=12.0 /t:Build;Publish /p:SqlPublishProfilePath=abcde.publish.xml

I am using TFS and VS 2013.5

Does anyone know how to fix this?

ERROR: Cannot find outputs of project output group

$
0
0

I am trying to automate build on my visual studio project from command prompt. The following is the code which I have tried.

"C:\Progra~1\Microsoft Visual Studio 9.0\Common7\IDE\devenv" "C:\Users\Admin\Desktop\WcfRestApplication3\RestService\
RestService.vdproj" /Build "Release" /Project RestService

But I got the following error

Microsoft (R) Visual Studio Version 9.0.30729.1.
Copyright (C) Microsoft Corp. All rights reserved.
------ Starting pre-build validation for project 'RestService' ------
ERROR: Cannot find outputs of project output group '(unable to determine name)'.
  Either the group, its configuration, or its project may have been removed from
 the solution.
ERROR: Cannot find outputs of project output group '(unable to determine name)'.
  Either the group, its configuration, or its project may have been removed from
 the solution.
------ Pre-build validation for project 'RestService' completed ------
------ Build started: Project: RestService, Configuration: Release ------
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

Can someone help me to resolve this? 

regards
Sebastian



Build Tools 2015 Update 3 build server error MSB3644 only .net 4.0

$
0
0

We use custom build server on Windows Server 2012 R2 64bit.
The build server uses MSBuild for building C# and C++ projects.

Installed programs are

  • Microsoft Build Tools 2015 Update 3
  • Microsoft .NET Framework 4.6.1 Developer Pack and Language Packs
  • Microsoft Visual C++ Build Tools 2015 Update 3

When building testing new empty class library csproj

  • for target framework 4.6.1 - builds Ok
  • for target framework 4.0 - builds FAILS with errorMSB3644

The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

Problem:

There is no Reference Assemblies folder v4.0 under c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\. There is onlyv4.6.1 folder.

Workaround:

Just copy this folder from your local PC (where VS was installed) to server.

Solution:

Microsoft please repair this problem and add missing referenceassemblies to package Microsoft Build Tools 2015 or toMicrosoft .NET Framework 4.6.1 Developer Pack package.



error MSB6006: "link.exe" exited with code -1073741816.

$
0
0

VS2015, Update 2

When running devenv commands entered at the command prompt our example test application builds OK. When we enter the same command from our application (which monitors the build process) the build fails with a linker crash, only under VS2015. It works OK in VS2010 and VS2012. The error we are seeing is:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(637,5): error MSB6006: "link.exe" exited with code -1073741816.

The Event log shows:

Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: link.exe
P2: 14.0.23918.0
P3: 56eb9256
P4: StackHash_9543
P5: 0.0.0.0
P6: 00000000
P7: c0000008
P8: 775bbb47
P9: 
P10: 


A typical command looks like:

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" C:\sample_projects\simple_string\simple_string.sln /Rebuild Debug

In the linker options we tried disabling Whole Program Optimization, Incremental Linking and Generate Manifest but it made no difference. At the moment we are reluctant to install Update 3.

We're not sure if its a genuine bug or something we are doing effecting the build process.


sqlclrtypes_x64/sqlsysclrtypes.msi has changed since it was initially published

$
0
0

Hi

I updated VS 2015 community to Update 3 yesterday. Went to publish and install my application (which previously worked absolutely fine) and I now get 

sqlclrtypes_x64/sqlsysclrtypes.msi has changed since it was initially published

I believe this is something to do with boostrap keys etc.. mismatched but I believed this was something that was fixed in Update 2 - well, it seems to be back :(

Can anyone help please, it would really be appreciated.

Carl

Selecting the toolset in continuous integration (error MSB8020)

$
0
0

Hello,

we have a continuous integration server in an experimental state. It runs builds under Visual Studio 2012 without problems. Then I upgraded one project to Visual Studio 2015, and installed VS2015 on the integration server. Now I see the following error message:

The builds tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". Install v140 to build using the v140 build tools.

The error originates from file C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets, line 44.

Obviously msbuild chose to search for the 140 toolset in its V110 folder when it should have used the V140 folder (which in fact exists).

How do I tell msbuild which folder to use, on a per-project basis (because some projects still use the 110 toolset)?

Thank you

Hans

assembly not found with deployed WindowsFormsApplication

$
0
0

Hello community!

I wrote an easy Code with 1 assembly with Visual Basic!

The assembly was chosen by VisualStudio2015Community during a new Toolbox item

On the development-PC is all fine.

The exe does not find the assembly in its own application folder after deployment via Windows installer or click-once.

or the exe does not find the assembly on the remote Maschine (via hyperV in the same Domain-Network).

What did I do till now?

I checked, if right assembly (Version) is in application folder > YES

I checked, if binding is a sucess via fuslogvw.exe > YES

I think!

There should be some false propertis in my code

Best Regards



Not a valid Win32 FileTime. Parameter name: fileTime

$
0
0

Hi,

    I've been using Visula Studio 2008 Professional for almost 2 yrs already. Just this week, I am currently receiving a "System.ArgumentOutOfRangeException: Not a valid Win32 FileTime. Parameter name: fileTime" error on all WINDOW FORM PROJECTS that I am creating and have created... I don't know if this was brought by the .net 4.0 update but up to know, I haven't resolved this... I am running vs2k8 on both Windows 7 x86 and Windows 2003 x64.

Hoping to receive feedback.

Thank you!

 

 

Error MSB4019: The imported project "C:\Microsoft.CSharp.targets" was not found.

$
0
0
Hello,

Here is my code:
    static void Main(string[] args)  
    {  
        // Instantiate a new Engine object  
        Engine engine = new Engine(@"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\");  
        Project project = new Project(engine);  
 
        try 
        {  
            project.Load(@"C:\Projects\WindowsFormsApplication1\WindowsFormsApplication1\WindowsFormsApplication1.csproj");           
            Console.WriteLine("Success!");  
        }  
        catch(Exception ex)  
        {  
            // The imported project "E:\Microsoft.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.  E:\Projects\WindowsFormsApplication1\WindowsFormsApplication1\WindowsFormsApplication1.csproj  
            Console.WriteLine("Failed: " + ex.Message);  
        }  
    }  
 
WindowsFormsApplication1.csproj is a Windows Forms VS2008 project that I created by the wizard. When I run my code I got en exception:
"C:\Projects\WindowsFormsApplication1\WindowsFormsApplication1\WindowsFormsApplication1.csproj(78,11): error MSB4019: The imported project "C:\Microsoft.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk."

Here is a line of code from WindowsFormsApplication1.csproj: 
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Could you advice how to resolve problem? That code works fine with VS2005 projects.

How to create a wrapper class in Visual Studio 2013 for activex control

$
0
0

I am not sure which forum I should post my question. If this thread should not be here, please forgive me.

I have built an COleControl under VC6 which can be used as an activex control by inserting it to an MFC C++ project through VC6. VC6 will generate a wrapper class for me. With the following string in the header file

// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++

Now I am developing under Visual Studio 2013, I want to upgrade the COleControl. I want to modify and build it under VS2013 and also I can use it. The problem is when I insert it as an activex control into my MFC dialog, VS2013 is not going to generate a complete wrapper class for me. The generated wrapper class has some functions missing.

From here, it said I have to create the wrapper class by myself. Is that means there has no more support under VS2013?


InvalidProjectFileException when trying to load a UWP project

$
0
0


I am writing a small application that loads project files, until now it has worked fine for all sorts of visual studio project files.

But it fails with UWP projects.


When I do:

var p = new Microsoft.Build.Evaluation.Project("some_UWP_project.csproj");

I get this exception:

InvalidProjectFileException: A numeric comparison was attempted on "$(TargetPlatformMinVersion)" that evaluates to "10.0.10240.0" instead of a number, in condition "'$(TargetPlatformIdentifier)' == 'UAP' And '$(TargetPlatformMinVersion)' != '' And '$(TargetPlatformMinVersion)' > '10.0.10587.0'".

Any clues?






Vicente Penades

Code Analysis Resultfile with Suppressions

$
0
0

Hello,

i want a Code Analysis Resultfile to not just have violations of Status "Active" but also the violations that have a Suppression Attribute. When i set the property

<CodeAnalysisSaveMessagesToReport>Active</CodeAnalysisSaveMessagesToReport>
  

and change it like following

<CodeAnalysisSaveMessagesToReport>Active,Excluded</CodeAnalysisSaveMessagesToReport>
 

then i get the needed results, but msbuild.exe does no more return 0 as Exit Code. Why does msbuild.exe have another Exit-Code, just because of the needed excluded violations in the report?

Does someone know why this is so? Is it a bug? Sadly all my TFS Server builds fail, because for success we check for Exit-Code 0. Any hints highly appreciated.


Peter


Copy .xbap file to subdirectory Publish\Application Files\MyApp_A_B_C_D

$
0
0

I have an AfterPublish Target task in my project file.

I'm trying to copy the .xbap file to the subfolder that is created   Publish\Application Files\MyApp_A_B_C_D  where A,B,C,D is the version information that will change with each build so they are NOT known.

How can I find and use this subfolder name in conjunction with the Copy task


CopySourceFiles="$(ProjectDir)$(PublishDir)$(AssemblyName).xbap"DestinationFolder="$(ProjectDir)$(PublishUrl)Application Files\<HOW TO FIND/USE THIS DIRECTORY>\."/>

Compiling the driver code along with the UI application written in C#

$
0
0

I'm very new to this. My question might look silly.

I had found an open source application busdog (just bing to find it on Github). It has two visual studio solutions in two different folders. One contains a filter driver written using C++ and the other is an application. I have made some changes to the C# code in GUI folder. How do I build them into a single executable?


I cannot find signtool.exe after downloading Visual Community 2015

$
0
0

Hi, I hope someone can help me - I am a complete numpty and not a programmer - however, I have developed an excel-based tool and I have software from Excel Software that builds a license wrapper round it and makes it into a .exe file. As there is no programming involved (from my side), I have no need or expertise in programming it (apart from Excel).

I got a digital certificate for my business so I could sign the macros in Excel, and I have been told that I can use signtool to sign the resulting .exe file.

I therefore downloaded the full Microsoft.net and visual community 2015 - but, alas, no signtool.exe was present, although I did look in the right place (the path was somewhere on the help files).

All I want to do is use the digital certificate I have to sign the .exe files so they are less likely to be blocked. Can anyone here explain where I can find this signtool.exe utility, or if that is not possible, is there anything else I can use? This must be a fairly standard operation, I would have thought, however, as I am not a programmer, I am afraid that I don't understand most of what is here (sorry!)

Any help really appreciated!

InstallShield Path Variable Overrides not working in .isproj file when building with MSBuild.

$
0
0

Currently we're using MSBuild to build an InstallShield .isproj file.  However, in the .isproj file I have a path overrides that doesn't seem to be, well, overriding.  I'm posting this here in hopes that maybe someone from the MSBuild side of things may have some suggestions.

I have the following in my .isproj file:

<ItemGroup>
<!-- The InstallShieldProject item selects the project to build -->
<InstallShieldProject Include="$(MSBuildProjectDirectory)\$(MSBuildProjectName).ism"/>
<InstallShieldPathVariableOverrides Include="$(OutDir)">
<PathVariable>TFSOutputDir</PathVariable>
</InstallShieldPathVariableOverrides>
</ItemGroup>

No matter what I try, "TFSOutputDir" will not get overridden. I tried replacing, "OutDir" with "OutputPath" and that didn't work either.

I'm running this against MSBuild, the version is 12.0, and I'm queuing the build through the web interface of TFS 2015.

Thanks.


UWP Build is extremely slow (VS 2015)

$
0
0

Just upgraded to Windows 10 and VS 2015.

On a basic UWP app with some nuget references the building process takes almost 1 minute. It stays mostly at "1>  Generating native code"

Then to create store packages it takes even longer, about 5 minutes.

Microsoft Visual Studio Community 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00079

Regards

Problem using PDB with native C++ Visual Studio 2012

$
0
0

I have two separate team projects in native C++, the main project and a core library used by this project.

I use a build server to build both projects. The problem is that the main project is not able to find the pdb file of the core library.

Below is what I’m currently doing:

1-    Setting for the core project:

      • In the properties, under C++ / Output Files / Program DataBase File Name: $(OutDir)$(TargetName).pdb
      • I use the /ZI option

    The core project creates the lib and the associate pdb file.

    I build this project on a dedicated build server and I want to use the library and PDB file for debugging the main project on my development PC. I copy both library and PDB file to my local computer in the same directory.

    2-    Setting for the main project

    1. When I link the project with the core library, it does not find the associate PDB of my library.
    2. I tried putting the directory where I copied the pdb and lib in the Visual Option Debugging Symbolsè  Same problem
    3. I tried to put the PDB in the debug directory of my main projectè This works, however I would like to have the PDB in a dedicated location, not in the debug directory
    4. I tried to get the core library project on my computer, build it and compile lib and PDBè This works however, I want to have the lib and PDB build on the server, not locally.

        Am I missing any settings or doing something wrong?

        Following Jack Zhai [MSFT] recommendation I'm posting here this problem.

        Initial post can be found at http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/4d067af5-3cca-4b8f-8f65-a493ef70b767

        Thanks

        Windows runtime metadata is invalid

        $
        0
        0

        Hello,

        I'm working on a Unity deployment for the hololens and have run into a little snag. I was able to deploy to the device with no problem until just yesterday I'm getting the above error when trying to deploy. There is a link that I'm redirected to that tells me to run a repair on my win 10 SDK, I've done that several times and still have been unable to deploy. I've completely uninstalled VS 2015 and reinstalled with the SDKs but it hasn't been able to work. I made a change to VS recently when I tried to acquire the experimental win Angle build for translating openGL to direct x 11 for the hololens in order to bypass Unity. When I tried to build the project in VS it required updates that I installed but it still wouldn't build. The machine is Win 10, with VS 2015 update 3, I have the latest hololens emulator 10.0.14342.1018, if that matters.

        I also had a question about the SDKs, I currently have 2 installed version, 10.0.26624 and 10.1.10586.212, is this the problem?

        Please let me know if you need any more information, any help is appreciated.

        Viewing all 2763 articles
        Browse latest View live


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