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

Msbuild publish profile not being passed to second web project for solution with multiple projects

$
0
0

I am trying to deploy via Hudson and there,

I have a solution file which has two web projects. Each web project has a publish profile of the same name.

It seems only the first web project built is taking the publish profile and the second one is not considering the publish profile.

My msbuild command

/p:Configuration=Release /t:Rebuild /p:PublishProfile=Normal /p:DeployOnBuild=true

and my second publish profile has

<PrecompileBeforePublish>True</PrecompileBeforePublish> <EnableUpdateable>True</EnableUpdateable><DebugSymbols>False</DebugSymbols><WDPMergeOption>CreateSeparateAssembly</WDPMergeOption> <UseFixedNames>True</UseFixedNames>

But the aspnet compiler is not getting passed with these options when I look at the logs for the second web site.

From the logs, I can see that first web project has

Validating PublishProfile(Normal) settings ,and the second project doesn't have that.

This is a mixed solution file which has the C# web project and  VB.net Website.

Basically what I want is the two sites taking different publish profiles and currently it seems only the first one is taking that and my second website project is not getting the publish profile.

If I run this using VS2013, the websites are published properly.

Ref:SO question

The project needs to be deployed

$
0
0

Unable to deploy any app to phone or emulator using latest versions of Windows (14393.5) on phone and desktop

Test:

Create a blank application (File | New project | Blank App | Blank App (Universal Windows)

Set it to target ARM on Device : F9: The project BlankApp needs to be deployed before it can be started

Set it to target ARM on Device : Build | Deploy :

Set it to target an emulator : the emulator starts and runs Win10, VS gives: DEP0001 unexpected error -2147467259

Another test:

Repeat with any application already running on the phone: same.

Do we really have to go through this every two weeks?

A

Wix installer project freezes

$
0
0

I've got a wix installer project that works fine when I build it in visual studio, but when I check it in the build server just freezes when it runs the linker (light) (see image).

Any thoughts as to what it could be and how to fix it?Frozen MSBuild

Check the existence of the given folder in MSBuild props file

$
0
0

I want to perform a task in which I need to check whether the folder mentioned in the given path is available or not.

If the folder is not available in the given path,then it has to make use of other folder given under alternative path.

So, I followed the below method,

 <Choose>
    <When Condition="(('$(BUILD)'=='Win8.1Windows8Release') Or ('$(BUILD)'=='Win8.1Windows8Debug'))">
      <PropertyGroup Condition ="Exists('D:\DK')">
        <ROOT Condition="'$(OVERRIDE_ROOT)'!='true'">D:\DK</ROOT>
        <LIB_DIR Condition="'$(OVERRIDE_LIB_DIR)'!='true'">$(ROOT)\lib</LIB_DIR>
      </PropertyGroup>
      </When>
     <Otherwise>
      <PropertyGroup>
        <ROOT Condition="'$(OVERRIDE_ROOT)'!='true'">E:\New\DK</ROOT>
        <LIB_DIR Condition="'$(OVERRIDE_LIB_DIR)'!='true'">$(ROOT)\lib</LIB_DIR>
      </PropertyGroup>
     </Otherwise>
  </Choose>

               But this is not working as expected. Instead it used only the folder mentioned under first case. If that first folder not available,then it didnt look for alternative path.

           Am sure that something I missed. Can anyone point out that??

Solution with .csproj and ASP.NET Core .xproj on a build server

$
0
0

I have a solution (.sln) that contains multiple projects of C# (.csproj) and ASP.NET Core type (.xproj). All projects target the full .NET 4.6 Framework, not .NET Core. The ASP.NET Core project has references to other of the C# projects. My build script calls MSBuild with the .sln file to build the entire solution.

This has worked fine before the ASP.NET Core project was there. The build server does not have Visual Studio installed, just the following packages:

  • Microsoft Build Tools 2015 (for MSBuild, compilers etc.)
  • Agents for Visual Studio 2015 (for MSTest)
  • .NET Framework 4.6
  • .NET Framework 4.6 Targeting Pack
  • .NET Core SDK 1.0.0 Preview 2

Now the build fails with the following error message for some of the projects:

C:\GitLabCI\builds\024ca24f\0\team\MyTeam\src\Common\Common.csproj : error MSB4057: Das Ziel "_GenerateDependencyFragmentJson" ist im Projekt nicht vorhanden.

Roughly translates as "The target '_GenerateDependencyFragmentJson' does not exist in the project."

What does that mean? Google doesn't even know that word.

In order to pass the NuGet package restore for the solution, I copied the two directoriesDotNet and DotNet.Web from C:\Program Files (x86)\MSBuild\VisualStudio\v14.0 from my development computer to the build server machine.

How to update Platform Toolset to GCC 5.0 in VS 2015?

$
0
0

How to update Platform Toolset to GCC 5.0 or above in VS 2015 Community Edition?

or 

when will VS 2015 provide the option of GCC 5.0 or above?


run code in visual studio code c++

$
0
0

how to compile and run my code in visual studio code

please help me

ISPROJ file built with MSBuild does not include all necessary dependencies in the MSI.

$
0
0

Greetings,

I am using the InstallShiled LE Spring 2012 version.

I have several projects that are using some Third party controls. In order to use these controls we add some file references for a set of assemblies registered in the GAC, these references are added to the Main Exe project for the solution. These are registered as part of an SDK developer package.

When I build the Solution in Visual Studio 2012, the installer includes these registered files and the installed application will work without any issues. However, if I build the Solution through the MSBuild command line these third part DLLs are not present in the MSI and that causes the application to fail when installed with an installer created by this process.


It basically looks like builds within VS2012 run the .Net Dependency scan, and the others do not.

The issue is that the compiled MSI is DIFFERENT when built via the command line than it is when built via Visual Studio. Since the MSI output by Visual Studio is correct and has all of the necessary referenced DLLs embedded within the installer, I would have to assume the issue is with the way the MSBuild Command line builds the isproj files.

The project builds in both formats without error

The issue is not a failed build, but the fact that the output MSI package from a command line or TFS build does not include all of the necessary files for the application to run once installed. There is some major difference in how the isproj files are being built when using a command line build versus using the Visual Studio IDE to build.

Since I cannot find any method of increasing the verbosity level of an isproj build log in VS IDE, I cannot compare it against the more verbose command line build. All I can tell is that when it is building the MSI, the IDE successfully scans and detects the needed dependencies, but the command line builds don't detect all of the necessary dependencies from the primary output.


Why is the ResolveProjectReferences taking a really long time?

$
0
0

In our project ResolveOrojectReferences taking very long time:



Is there a way we can reduce this time?

How MSBuild behaves in DependsOnTargets case?

$
0
0

If I am having below scenario:

<Target Name="Serve1" DependsOnTargets="Chop;Cook" />

<Target Name="Serve2" DependsOnTargets="Chop" />

<Target Name="Chop" />

<Target Name="Cook" />

Will "Chop" runs multiple times or once only.

Is the above scenario related to "ResolveProjectReferences". Will it be taking more time

to build?


"TransformXml" "Destination" is not working because $(DeployPath) returns blank

$
0
0

In my ASP.Net Umbraco MVC application, I am trying to apply config file transformations to a config file other than web.config.

In my case the config file is at "Config/FullTextSearch.config". I am looking for the change to be applied to the copy of Config/FullTextSearch.config which is copied to the "Package" for subsequent use by Web Deploy.  As I understand it I think this means that the result should be copied to the destination at obj\Release\Package\PackageTmp (or similar for "Debug" configuration)?

To do this I am following guidance from the blog post at http://johan.driessen.se/posts/Applying-MSBuild-Config-Transformations-to-any-config-file-without-using-any-Visual-Studio-extensions.

As part of this I have made the following changes to my "Project" file:
       

    <Content Include="Config\FullTextSearch.config">
      <SubType>Designer</SubType>
    </Content>
    <Content Include="Config\FullTextSearch.Release.config" >
      <DependentUpon>FullTextSearch.config</DependentUpon>
    </Content>
    <Content Include="Config\FullTextSearch.Debug.config" >
    <DependentUpon>FullTextSearch.config</DependentUpon>
    </Content>
    <Content Include="Config\FullTextSearch.Test.config" >
    <DependentUpon>FullTextSearch.config</DependentUpon>
    </Content>

    and at the end of the project file:

    <UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.Tasks.dll" />
    <Target Name="AfterBuild">
    <TransformXml Source="Config\FullTextSearch.config" Transform="Config\FullTextSearch.$(Configuration).config" Destination="$(DeployPath)\Config\FullTextSearch.config" />
  </Target>

Unfortunatley the "TransformXml" "Destination" is not working because $(DeployPath) returns blank. I have checked this with <Message Text="DeployPath:  $(DeployPath)" /> .  The error I get is

1>  Transforming Source File: Config\FullTextSearch.config
1>    Applying Transform File: Config\FullTextSearch.Test.config
1>    Output File: \Config\FullTextSearch.config
1>C:\Clancy\A_TeraTastic\Dev\TeraTastic09\TeraTastic\TeraTastic.csproj(5781,5): error : Could not write Destination file: Could not find a part of the path 'C:\Config\FullTextSearch.config'.
1>  Transformation failed

Can anyone help me understand what I should be useing instead of $(DeployPath)  ?

Thanks

Terry Clancy
ClanceZ


Terry Clancy

TFS 2015 msbuild fails to resolve project reference.

$
0
0

Msbuild is failing to resolve the project references correctly, causing a build error. 

I don't understand why. The solution builds correctly in visual studio on the same machine using exactly the same code, performing a clean and build. 

I've turned off parallel builds in case this was causing an issue.  I stumped as to the cause and how to fix it?

Why does MSBUILD behave differently to Visual Studio?

The command exited with code 3

$
0
0

I keep getting this error when I try to build one of my projects: 

Error1 The command ""C:\work\.....PreBuildStep.bat" C:\work\"ProjectName".csproj C:\work\...." exited with code 3.

I haven't entered the  full path but that is what the error looks like in general. 

In the output it says "The system cannot find the path specified" -> C:\Program Files...(x86)..........\Microsoft.Common.CurrentVersion.targets"

I have already tried "sharing" the folder with "everybody" and giving them read/write access. 

Any suggestions?

Thanks. 


MSB3073 VCEnd exited with code 1

$
0
0

Error102 error MSB3073: The command "copy C:\Users\Bike Simulation\Desktop\testing_dll\DrivingSimulator_DLL\example\DrivingSimulatorTextClient\..\..\bin\VS2010\Win32\DrivingSimulatorProxy.dll C:\Users\Bike Simulation\Desktop\testing_dll\DrivingSimulator_DLL\example\DrivingSimulatorTextClient\bin\VS2010\Win32\Release\
:VCEnd" exited with code 1.C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets1325 DrivingSimulatorTextClient

I have seen the forums for the MSB3073 error, but i am unable to fix the problem on my code. 

Add context menu in Visual Studio

$
0
0

Hi,

I would like to add my own context menu on the visual studio editor. My actual scenario is that new context menu should be shown/visible only when right clicked on specify file extension that are added in the solution (ex : only right clicking on .cs files ).

On clicking of that context menu i would like to call a method which exists in different project of same solution. 

Please advice me how to implement it.


Thanks - Ravi


Error occurred while publishing web app (Hexadecimal value 0x12 is an invalid character)

$
0
0

Hi, everyone.

I was about to publish my web app on the server with Visual Studio 2015. However, the Visual Studio 2015 yielded an error'', hexadecimal value 0x12, is an invalid character. Line 1, position 234.

It doesn't give me enough clue to troubleshoot this empty line as the error column File is empty.

How can I troubleshoot this issue? Please drop me a line if you know how.

Cheers,

Angelo


Angelo

what's happenning?

$
0
0

I am posting a screen that says it all.  The projects I have attempted to run in debug are derived from an almost identical solution that runs successfully. I cannot understand the diagnostic that is shown or venture a guess as to where I have perturbed the stability. Any clues or guesses will be welcome.


eps123

Compilation failed, error in MSBuild: Object reference not set to an instance of an object.

$
0
0

I've installed Visual Studio 2015 Update 3 and the ASP.NET Core tools preview 2 on Windows 7. Then I tried to build a solution that contains .NET 4.6 C# projects, and one ASP.NET Core .NET 4.6 project. Everything builds and runs fine on my developer machine, but the build machine throws an error on build.

Here's the part of the output window in Visual Studio:

(...)
23>------ Neues Erstellen gestartet: Projekt: MyWeb, Konfiguration: Release Any CPU ------
23>  C:\Program Files\dotnet\dotnet.exe build "C:\GitLabCI\builds\024ca24f\0\team\VP\src\Server\MyWeb" --configuration Release --no-dependencies --build-base-path "C:\GitLabCI\builds\024ca24f\0\team\VP\artifacts\bin\VP.Server.MyWeb" --no-incremental
23>  Project MyWeb (.NETFramework,Version=v4.6) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information.
23>  Compiling MyWeb for .NETFramework,Version=v4.6
23>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(262,5): error : Object reference not set to an instance of an object.
23>  C:\Program Files\dotnet\dotnet.exe compile-csc @C:\GitLabCI\builds\024ca24f\0\team\VP\artifacts\bin\VP.Server.MyWeb\MyWeb\obj\Release\net46\dotnet-compile.rsp returned Exit Code 1
23>  Compilation failed.
23>      0 Warning(s)
23>      0 Error(s)
23>  Time elapsed 00:00:01.0574172
========== Alles neu erstellen: 22 erfolgreich, 1 fehlerhaft, 0 übersprungen ==========

What's wrong here?

Deployment and modification of web.config file

$
0
0
I could not find a better place to pose this question. I am looking for a method of transforming my connection strings from my VS environment to my web server. I have already accomplished this successfully on one application thru copying and guessing but I would like something a bit more scientific. I will appreciate any advice or links.

eps123

Read/Write Permission

$
0
0
I have developed an application using C# that using a serial key that generates a licenses file once activated successfully. However; after creating the setup file it the application is unable to create the license file in the application directory due to read/write permissions. How do I make the folder writable for the application so that it can create the license file.
Viewing all 2763 articles
Browse latest View live