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

Latest version of VS 2017 fails to compile with error 'C++ Standard Library forbids macroizing keywords'

$
0
0

I don't work on C++. There is some legacy code in my project which we don't touch and it has been working since decades. Now the latest version (15.8.0 and onwards) of VS 2017 fails to compile with error 'C++ Standard Library forbids macroizing keywords'.

I tried to ask Visual studio developer community, but they won't fix it in VS 2017

Please help


Dheeraj




msixbundle vs. appxbundle

$
0
0

Hi,

Am using "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe" to build a solution to generate appxbundle package for UWP app written in c#&xaml. VS2017 version is 15.9.4. I have updated to this version recently. Earlier msbuild used to generate appxbundle, but now it's generating msixbundle. We deploy the package to Xbox in Dev Mode using Xbox Dev portal, but it's not supporting msixbundle yet. Alternatively we can use WinAppDeployCmd.exe to deploy msixbundle. But our deployment & testing team doesn't have Windows 10 machine & SDK. So they use only Dev portal to deploy. With msixbundle it's not working. 

I have searched VS2017 options to generate appxbundle, but didn't find any. How can we force MSBuild to generate appxbundle instead of  msixbundle?

This is high priority issue which is blocking our release. Any input is greatly appreciated.

Thanks,.

Msbuild (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin) ignores Pubxml file if added to any location other than project /Properties/PublishProfiles/

$
0
0

Hi,

i am trying to Publish .Net Core application using  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSbuild.exe

Here is the command

$msbuildExe = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"

$filePath =  "C:\Projects\CorePublicApi\src\DeveloperPortal\DeveloperPortal\DeveloperPortal.csproj"

$pxmlUID="XXXXXXXXX"
$pxmlPWD="XXXXXXXXX"
$pxmlPath = "C:\Test\Base.pubxml"
&$msbuildExe $filePath, '/p:DeployOnBuild=true',"/p:PublishProfile=$pxmlPath","/p:Username=$pxmlUID", "/p:Password=$pxmlPWD", '/p:Configuration=Release', '/p:AllowUntrustedCertificate=True', '/p:WarningLevel=0', '/p:verbosity=quiet', '/p:MvcBuildViews=false'

As you can see i am expecting MSbuild to fetch PubXml file from the location given above(i.e.C:\Test\Base.pubxml ), but it gets ignored and MSBuild publish to default location.

However when i create the folder structure Properties/PublishProfiles in the project root location and add this pubxml file to this location MSbuild does recognize this and works as expected.

All i require is MSBuild should be able to fetch PubXml from any location i specify.

Am i doing anything wrong? Please guide.

Thank you

After installing VS2017 Build tools on CI server, project containing Workflow Foundation components fails to build on Ci server

$
0
0

Locally it everything builds fine with my local installation of vs2017.


On the build server I installed vs_BuildTools (using offline installer). No option for workflow to be found in the installer.

One of the projects of the solution fails on build with following error

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Xaml.targets(193,5): error MSB4062: The "Microsoft.Build.Tasks.Xaml.PartialClassGenerationTask" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\\XamlBuildTask.dll. Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\XamlBuildTask.dll' or one of its dependencies. The system cannot find the file specified. 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. 

* VS2017 full installer seems to have an indiviual component for workflow
* VS_BuildTools does not seem to have an indivual component for worklow
* I can only use the offline installer of vs_buildtools (firewall policy on the server).
* Prior to upgrading the solution to vs2017 the project was building fine on the buildserver

Is there anything else I need to install ?


Target "ResolveTagHelperRazorGenerateInputs" does not exist in the project, SDK.Razor.CurrentVersion.Targets

$
0
0

Hi Community,

After being stupid, I deleted the section ResolveTagHelperRazorGenerateInputs.... I couldnt go Undo the file anymore, so it gave me this error. 

From that point on, I did the following: 

Deleted the file SDK.Razor.CurrentVersion.Targets

Reinstalled the sdk packages,

Reinstalled VS, 

Deleted the razor project,

Made a new Razor project, 

The only thing I didnt do as yet is make a whole new solution and copy the content of the sdk.razor.currentversion.targets into the old one. 

Does anyone knows how I can resolve this one? Thank you in advance!!

<!--
***********************************************************************************************
Sdk.Razor.CurrentVersion.targets

WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
          created a backup copy.  Incorrect changes to this file will make it
          impossible to load or build your projects from the command-line or the IDE.

Copyright (c) .NET Foundation. All rights reserved.
***********************************************************************************************
--><Project ToolsVersion="14.0" TreatAsLocalProperty="_RazorSdkTasksTFM"><!-- 
    Targets supporting Razor MSBuild integration. Contain support for generating C# code using Razor
    and including the generated code in the project lifecycle, including compiling, publishing and producing
    nuget packages.
  --><!--
    This is a hook to import a set of targets before the Razor targets. By default this is unused.
  --><Import Project="$(CustomBeforeRazorSdkTargets)" Condition="'$(CustomBeforeRazorSdkTargets)' != '' and Exists('$(CustomBeforeRazorSdkTargets)')"/><PropertyGroup><RazorSdkBuildTasksDirectoryRoot Condition="'$(RazorSdkBuildTasksDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\..\tasks\</RazorSdkBuildTasksDirectoryRoot><_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">netstandard2.0</_RazorSdkTasksTFM><_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net46</_RazorSdkTasksTFM><RazorSdkBuildTasksAssembly>$(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll</RazorSdkBuildTasksAssembly></PropertyGroup><!--
    Razor defines two primary targets:
      'RazorGenerate' - which updates generated code
      'RazorCompile' - compiles an assembly from generated code

    Use these properties and targets to attach behavior to the corresponding phase.
  --><PropertyGroup><PrepareForRazorGenerateDependsOn>
      ResolveRazorConfiguration;
      ResolveRazorGenerateInputs;
      AssignRazorGenerateTargetPaths;
      ResolveAssemblyReferenceRazorGenerateInputs;
      _CheckForMissingRazorCompiler;
      ResolveTagHelperRazorGenerateInputs</PrepareForRazorGenerateDependsOn><RazorGenerateDependsOn>
      PrepareForRazorGenerate;
      _CheckForMissingRazorCompiler;
      RazorCoreGenerate</RazorGenerateDependsOn><PrepareForRazorCompileDependsOn>
      RazorGenerate;
      ResolveRazorCompileInputs;
      GenerateRazorTargetAssemblyInfo</PrepareForRazorCompileDependsOn><ResolveRazorCompileInputsDependsOn>
      ResolveRazorEmbeddedResources</ResolveRazorCompileInputsDependsOn><RazorCompileDependsOn>
      PrepareForRazorCompile;
      RazorCoreCompile</RazorCompileDependsOn><BuiltProjectOutputGroupDependsOn>
      $(BuiltProjectOutputGroupDependsOn);
      _RazorAddBuiltProjectOutputGroupOutput</BuiltProjectOutputGroupDependsOn><DebugSymbolsProjectOutputGroupDependsOn>
      $(DebugSymbolsProjectOutputGroupDependsOn);
      _RazorAddDebugSymbolsProjectOutputGroupOutput</DebugSymbolsProjectOutputGroupDependsOn><PrepareForBuildDependsOn>
      $(PrepareForBuildDependsOn);
      ResolveRazorGenerateInputs</PrepareForBuildDependsOn><GenerateNuspecDependsOn>
      ResolveRazorGenerateInputs;
      $(GenerateNuspecDependsOn)</GenerateNuspecDependsOn><PrepareForRunDependsOn>
      _RazorPrepareForRun;
      $(PrepareForRunDependsOn)</PrepareForRunDependsOn><GetCopyToOutputDirectoryItemsDependsOn>
      _RazorGetCopyToOutputDirectoryItems;
      $(GetCopyToOutputDirectoryItems)</GetCopyToOutputDirectoryItemsDependsOn></PropertyGroup><!-- 
    Default values for properties that affect Razor targets to the standard build lifecycle.
  --><PropertyGroup Condition="'$(RazorCompileOnBuild)'=='' AND '$(Language)'=='C#'"><RazorCompileOnBuild>true</RazorCompileOnBuild></PropertyGroup><PropertyGroup Condition="'$(RazorCompileOnPublish)'=='' AND '$(Language)'=='C#'"><!-- Always compile on publish by default if we're compiling on build --><RazorCompileOnPublish Condition="'$(RazorCompileOnBuild)'=='true'">true</RazorCompileOnPublish><!-- Compatibility with the old MVC Precompilation setting --><RazorCompileOnPublish Condition="'$(RazorCompileOnPublish)'==''">$(MvcRazorCompileOnPublish)</RazorCompileOnPublish><!-- Default to on if MvcRazorCompileOnPublish isn't set for some reason --><RazorCompileOnPublish Condition="'$(RazorCompileOnPublish)'==''">true</RazorCompileOnPublish></PropertyGroup><!--
    Properties that configure Razor SDK, but need to be defined in targets due to evaluation order.
  --><PropertyGroup><!-- Output directory used for generated files --><RazorGenerateIntermediateOutputPath Condition="'$(RazorGenerateIntermediateOutputPath)'==''">$(IntermediateOutputPath)Razor\</RazorGenerateIntermediateOutputPath><!-- Suffix appended to $(TargetName) to produce $(RazorTargetName), the name of the assembly produced by Razor --><RazorTargetNameSuffix Condition="'$(RazorTargetNameSuffix)' == ''">.Razor</RazorTargetNameSuffix><!-- File name (without extension) of the assembly produced by Razor --><RazorTargetName Condition="'$(RazorTargetName)'==''">$(TargetName)$(RazorTargetNameSuffix)</RazorTargetName><!--
      The compatibility zone - these properties were provided by the MVC Precompilation tool and they
      map to supported settings in Razor SDK.

      We want to set the defaults for these in the .props file, but we need to process the old settings here
      in case they were set in the project file. The consequence of this is that the old settings will override
      the new ones if they are set to conflicting values.
    --><CopyRazorGenerateFilesToPublishDirectory Condition="'$(MvcRazorExcludeViewFilesFromPublish)'=='true'">false</CopyRazorGenerateFilesToPublishDirectory><CopyRazorGenerateFilesToPublishDirectory Condition="'$(MvcRazorExcludeViewFilesFromPublish)'=='false'">true</CopyRazorGenerateFilesToPublishDirectory><CopyRefAssembliesToPublishDirectory Condition="'$(MvcRazorExcludeRefAssembliesFromPublish)'=='true'">false</CopyRefAssembliesToPublishDirectory><CopyRefAssembliesToPublishDirectory Condition="'$(MvcRazorExcludeRefAssembliesFromPublish)'=='false'">true</CopyRefAssembliesToPublishDirectory><!-- 
      We can't set the actual default value here due to evaluation order (depends on $(OutDir)).
      This handles a compatibility case with MVC Precompilation.
    --><RazorOutputPath Condition="'$(MvcRazorOutputPath)'!=''">$([MSBuild]::EnsureTrailingSlash('$(MvcRazorOutputPath)'))</RazorOutputPath><!--
      Configures whether all of the @(RazorGenerate) items will be added as embedded files to the produced assembly.

      When true, everything in @(RazorGenerate) will be added to @(RazorEmbeddedFiles) and passed to CSC.  
    --><EmbedRazorGenerateSources Condition="'$(MvcRazorEmbedViewSources)'!=''">$(MvcRazorEmbedViewSources)</EmbedRazorGenerateSources><EmbedRazorGenerateSources Condition="'$(EmbedRazorGenerateSources)'==''">false</EmbedRazorGenerateSources><!--
    Set to false to disable Razor code generation from using a persistent build server process.
    --><UseRazorBuildServer Condition="'$(UseRazorBuildServer)'==''">$(UseSharedCompilation)</UseRazorBuildServer><UseRazorBuildServer Condition="'$(UseRazorBuildServer)'==''">true</UseRazorBuildServer></PropertyGroup><PropertyGroup><!-- Similar to https://github.com/Microsoft/msbuild/blob/908cc9ccd4961441628f68e37a148183a87bb067/src/Tasks/Microsoft.Common.CurrentVersion.targets#L146-L153 --><_RazorDebugSymbolsProduced>false</_RazorDebugSymbolsProduced><_RazorDebugSymbolsProduced Condition="'$(DebugSymbols)'=='true'">true</_RazorDebugSymbolsProduced><_RazorDebugSymbolsProduced Condition="'$(DebugType)'=='none'">false</_RazorDebugSymbolsProduced><_RazorDebugSymbolsProduced Condition="'$(DebugType)'=='pdbonly'">true</_RazorDebugSymbolsProduced><_RazorDebugSymbolsProduced Condition="'$(DebugType)'=='full'">true</_RazorDebugSymbolsProduced><_RazorDebugSymbolsProduced Condition="'$(DebugType)'=='portable'">true</_RazorDebugSymbolsProduced><_RazorDebugSymbolsProduced Condition="'$(DebugType)'=='embedded'">false</_RazorDebugSymbolsProduced></PropertyGroup><!-- Resolve the toolset to use --><PropertyGroup><!-- Default value for the property 'MvcRazorCompileOnPublish' is empty. If it has been explicitly enabled, continue using precompilation. --><ResolvedRazorCompileToolset Condition="'$(MvcRazorCompileOnPublish)' == 'true'">PrecompilationTool</ResolvedRazorCompileToolset><!-- The default value for 'RazorCompileToolset' was not modified. In this case, infer the toolset to use as RazorSdk. --><ResolvedRazorCompileToolset Condition="'$(MvcRazorCompileOnPublish)' == '' AND '$(RazorCompileToolset)' == 'Implicit'">RazorSdk</ResolvedRazorCompileToolset><ResolvedRazorCompileToolset Condition="'$(MvcRazorCompileOnPublish)' == '' AND '$(RazorCompileToolset)' == 'PrecompilationTool'">$(RazorCompileToolset)</ResolvedRazorCompileToolset><ResolvedRazorCompileToolset Condition="'$(MvcRazorCompileOnPublish)' == '' AND '$(RazorCompileToolset)' == 'RazorSdk'">$(RazorCompileToolset)</ResolvedRazorCompileToolset><!-- If RazorSdk is not referenced, fall-back to Precompilation tool --><ResolvedRazorCompileToolset Condition="'$(ResolvedRazorCompileToolset)' == 'RazorSdk' And '$(IsRazorCompilerReferenced)' != 'true'">PrecompilationTool</ResolvedRazorCompileToolset><!-- Previous versions of the precompilation tool still depends on the msbuild property 'MvcRazorCompileOnPublish'. Hence, setting it to the old default value --><MvcRazorCompileOnPublish Condition="'$(MvcRazorCompileOnPublish)' == ''">true</MvcRazorCompileOnPublish></PropertyGroup><!--
    Properties that configure Razor SDK, but need to be defined in targets due to evaluation order.
  --><ItemGroup><!-- Used to creating the final compiled Razor dll --><RazorIntermediateAssembly Condition="'$(RazorIntermediateAssembly)'==''" Include="$(IntermediateOutputPath)$(RazorTargetName).dll" /><!-- Used in Compilation.targets -->   <_RazorDebugSymbolsIntermediatePath Condition="'$(_RazorDebugSymbolsProduced)'=='true'" Include="$(IntermediateOutputPath)$(RazorTargetName).pdb" /></ItemGroup><ItemGroup><!--
      Add all cshtml files to UpToDateCheckInput - a collection of files used by FastUpToDateCheck to determine
      if any of the the project inputs have changed.
    --><UpToDateCheckInput Condition="'$(RazorCompileOnBuild)'=='true'" Include="@(Content->WithMetadataValue('Extension', '.cshtml'))" /><!--
      Add Razor output files to UpToDateCheckBuilt - a collection of files used by FastUpToDateCheck to determine
      if any of the project's outputs have changed.
    --><UpToDateCheckBuilt Include="@(RazorIntermediateAssembly)"
      Condition="'$(RazorCompileOnBuild)'=='true' AND '@(Content->WithMetadataValue('Extension', '.cshtml'))' != ''" /></ItemGroup><!--
    These are the targets that generate code using Razor, separated from the main file for ease of maintenance.
    Most targets related to Razor code generation are defined there.
  --><Import Project="$(RazorCodeGenerationTargetsPath)"
    Condition="'$(RazorCodeGenerationTargetsPath)' != '' AND Exists('$(RazorCodeGenerationTargetsPath)')" /><Import Project="Microsoft.NET.Sdk.Razor.GenerateAssemblyInfo.targets" /><!-- 
    These are the targets that actually do compilation using CSC, separated from the main file for ease of maintenance.

    RazorCoreCompile should be defined there.
  --><Import Project="Microsoft.NET.Sdk.Razor.Compilation.targets" /><Target Name="PrepareForRazorGenerate" DependsOnTargets="$(PrepareForRazorGenerateDependsOn)"></Target><Target Name="RazorGenerate" DependsOnTargets="$(RazorGenerateDependsOn)"></Target><Target Name="PrepareForRazorCompile" DependsOnTargets="$(PrepareForRazorCompileDependsOn)"></Target><Target Name="RazorCompile" DependsOnTargets="$(RazorCompileDependsOn)"></Target><!-- 
    Computes the applicable @(ResolvedRazorConfiguration) and @(ResolvedRazorExtension) items that match the project's
    configuration. 
  --><Target 
    Name="ResolveRazorConfiguration"
    Condition="'$(RazorDefaultConfiguration)'!=''"><ItemGroup><ResolvedRazorConfiguration Include="@(RazorConfiguration)" Condition="'%(RazorConfiguration.Identity)'=='$(RazorDefaultConfiguration)'" /></ItemGroup><FindInList List="@(RazorExtension)" ItemSpecToFind="@(RazorConfiguration->Metadata('Extensions'))"><Output TaskParameter="ItemFound" ItemName="ResolvedRazorExtension" /></FindInList></Target><!--
    Gets assembly attributes in support for Razor runtime code generation. This is a set of standard
    metadata attributes (defined in Microsoft.AspNetCore.Razor.Runtime) that capture the build-time
    Razor configuration of an application to be used at runtime.
    This allows the project file to act as the source of truth for the applicable Razor configuration regardless 
    of how Razor is used.

    The SDK expects configurations that use runtime compilation to set $(GenerateRazorHostingAssemblyInfo) to true,
    it will be unset by default.
  --><PropertyGroup><_GenerateRazorAssemblyInfoDependsOn>RazorGetAssemblyAttributes;$(_GenerateRazorAssemblyInfoDependsOn)</_GenerateRazorAssemblyInfoDependsOn></PropertyGroup><Target 
    Name="RazorGetAssemblyAttributes"
    Condition="'$(GenerateRazorHostingAssemblyInfo)'=='true' and '$(RazorDefaultConfiguration)'!=''"
    DependsOnTargets="ResolveRazorConfiguration"><ItemGroup><_RazorAssemblyAttribute Include="Microsoft.AspNetCore.Razor.Hosting.RazorLanguageVersionAttribute"><_Parameter1>$(RazorLangVersion)</_Parameter1></_RazorAssemblyAttribute><_RazorAssemblyAttribute Include="Microsoft.AspNetCore.Razor.Hosting.RazorConfigurationNameAttribute"><_Parameter1>$(RazorDefaultConfiguration)</_Parameter1></_RazorAssemblyAttribute><_RazorAssemblyAttribute Include="Microsoft.AspNetCore.Razor.Hosting.RazorExtensionAssemblyNameAttribute" Condition="'%(ResolvedRazorExtension.AssemblyName)'!=''"><_Parameter1>%(ResolvedRazorExtension.Identity)</_Parameter1><_Parameter2>%(ResolvedRazorExtension.AssemblyName)</_Parameter2></_RazorAssemblyAttribute></ItemGroup></Target><!--
    Gathers input source files for code generation. This is a separate target so that we can avoid
    lots of work when there are no inputs for code generation.
    This target runs as part of PrepareForBuild. This gives us an opportunitity to change things like CopyToPublishDirectory
    for Content items before they are processed by other Build targets.

    NOTE: This target is called as part of an incremental build scenario in VS. Do not perform any work
    outside of calculating RazorGenerate items in this target.
  --><Target Name="ResolveRazorGenerateInputs"><!--
      In MVC Precompilation MvcRazorFilesToCompile also had the effect of suppressing the default
      items for Razor code generation. As with all of these MVC Precompilation back-compat settings,
      using the old thing, overrides the new thing.
    --><PropertyGroup Condition="'@(MvcRazorFilesToCompile)'!=''"><EnableDefaultRazorGenerateItems>false</EnableDefaultRazorGenerateItems></PropertyGroup><ItemGroup><RazorGenerate Include="@(MvcRazorFilesToCompile)" /></ItemGroup><ItemGroup Condition="'$(EnableDefaultRazorGenerateItems)'=='true'"><RazorGenerate Include="@(Content)" Condition="'%(Content.Extension)'=='.cshtml'" /></ItemGroup><!--
      Ideally we want to able to update all Content items that also appear in RazorGenerate to have
      CopyToPublishDirectory=Never. However, there isn't a simple way to do this (https://github.com/Microsoft/msbuild/issues/1618). 
      Instead, we'll update all cshtml Content items when EnableDefaultRazorGenerateItems=true and Razor Sdk is used for publishing.
    --><ItemGroup Condition="
      '$(EnableDefaultRazorGenerateItems)'=='true' and 
      '$(CopyRazorGenerateFilesToPublishDirectory)'=='false' and 
      '$(ResolvedRazorCompileToolset)'=='RazorSdk' and 
      '$(RazorCompileOnPublish)'=='true'"><Content Condition="'%(Content.Extension)'=='.cshtml'" CopyToPublishDirectory="Never" /></ItemGroup><ItemGroup Condition="
      '$(ResolvedRazorCompileToolset)'=='RazorSdk' and
      '$(EnableDefaultRazorGenerateItems)'=='true'"><Content Condition="'%(Content.Extension)'=='.cshtml'" Pack="$(IncludeRazorContentInPack)" /></ItemGroup></Target><Target Name="AssignRazorGenerateTargetPaths" Condition="'@(RazorGenerate)' != ''"><AssignTargetPath Files="@(RazorGenerate)" RootFolder="$(MSBuildProjectDirectory)"><Output TaskParameter="AssignedFiles" ItemName="RazorGenerateWithTargetPath" /></AssignTargetPath><ItemGroup><RazorGenerateWithTargetPath Condition="'%(RazorGenerateWithTargetPath.GeneratedOutput)' == ''"><GeneratedOutput>$(RazorGenerateIntermediateOutputPath)$([System.IO.Path]::ChangeExtension('%(RazorGenerateWithTargetPath.TargetPath)', '$(RazorGenerateOutputFileExtension)'))</GeneratedOutput></RazorGenerateWithTargetPath></ItemGroup></Target><!-- 
    Gathers input assemblies for Tag Helper discovery and compilation. Add items to @(ReferencePath)
  --><Target
    Name="ResolveAssemblyReferenceRazorGenerateInputs"
    DependsOnTargets="ResolveReferences"><ItemGroup><RazorReferencePath Include="@(ReferencePath)"/><RazorReferencePath Include="$([System.IO.Path]::GetFullPath('$(IntermediateOutputPath)$(TargetName)$(TargetExt)'))"/></ItemGroup></Target><!--
    Gathers inputs to the RazorCoreCompile target into the @(RazorCompile) itemgroup.

    This is marker target so that the code generation targets can attach.
  --><Target Name="ResolveRazorCompileInputs" DependsOnTargets="$(ResolveRazorCompileInputsDependsOn)"></Target><Target Name="ResolveRazorEmbeddedResources" Condition="'$(EmbedRazorGenerateSources)'=='true'"><ItemGroup><RazorEmbeddedResource Include="@(RazorGenerateWithTargetPath)"><LogicalName>/$([System.String]::Copy('%(RazorGenerateWithTargetPath.TargetPath)').Replace('\','/'))</LogicalName><Type>Non-Resx</Type><WithCulture>false</WithCulture></RazorEmbeddedResource><!-- Similar to _GenerateCompileInputs --><_RazorCoreCompileResourceInputs
        Include="@(RazorEmbeddedResource)"
        Condition="'%(RazorEmbeddedResource.WithCulture)'=='false' and '%(RazorEmbeddedResource.Type)'=='Non-Resx' " /></ItemGroup></Target><!--
    This target is called after PrepareForPublish when RazorCompileOnPublish=true so that we can hook into publish.
    This target just hooks up other targets since Publish and PrepareForPublish don't have a DependsOnTargets
    property we can use. 
  --><Target 
    Name="_RazorPrepareForPublish"
    AfterTargets="PrepareForPublish"
    DependsOnTargets="RazorCompile"
    Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnPublish)'=='true' and '$(NoBuild)'!='true'"></Target><!--
    This target adds the Razor assembly to the BuiltProjectOutputGroupOutput - which is used as input to the Pack target.
  --><Target 
    Name="_RazorAddBuiltProjectOutputGroupOutput"
    DependsOnTargets="_ResolveRazorTargetPath;ResolveRazorGenerateInputs"
    Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnBuild)'=='true'"><ItemGroup Condition="'@(RazorGenerate)'!= ''"><BuiltProjectOutputGroupOutput Include="%(RazorIntermediateAssembly.FullPath)" FinalOutputPath="$(RazorTargetPath)" /></ItemGroup></Target><Target
    Name="_RazorAddDebugSymbolsProjectOutputGroupOutput"
    DependsOnTargets="_ResolveRazorTargetPath;ResolveRazorGenerateInputs"
    Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnBuild)'=='true'"><ItemGroup Condition="Exists('@(_RazorDebugSymbolsIntermediatePath)')"><DebugSymbolsProjectOutputGroupOutput Include="%(_RazorDebugSymbolsIntermediatePath.FullPath)" FinalOutputPath="$(RazorTargetDir)$(RazorTargetName).pdb" /></ItemGroup></Target><!--
    Set up RazorCompile to run before PrepareForRun. This should ensure that the Razor dll and pdbs are available to be copied
    as part of GetCopyToOutputDirectoryItems which is invoked during PrepareForRun.
  --><Target
    Name="_RazorPrepareForRun"
    DependsOnTargets="RazorCompile"
    Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnBuild)'=='true'" /><!--
    Called as part of GetCopyToOutputDirectoryItems - this target populates the list of items that get
    copied to the output directory when building as a project reference.
  --><Target 
    Name="_RazorGetCopyToOutputDirectoryItems"
    DependsOnTargets="ResolveRazorGenerateInputs"
    Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnBuild)'=='true'"><!-- 
      This condition needs to be inside the target because it the itemgroup will be populated after the target's
      condition is evaluated.
    --><ItemGroup Condition="'@(RazorGenerate)'!=''"><AllItemsFullPathWithTargetPath Include="@(RazorIntermediateAssembly->'%(FullPath)')"><TargetPath>%(Filename)%(Extension)</TargetPath><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></AllItemsFullPathWithTargetPath><AllItemsFullPathWithTargetPath Include="@(_RazorDebugSymbolsIntermediatePath->'%(FullPath)')"><TargetPath>%(Filename)%(Extension)</TargetPath><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></AllItemsFullPathWithTargetPath></ItemGroup></Target><!--
    Called as part of GetCopyToPublishDirectoryItems - this target populates the list of items that get
    copied to the publish directory when publishing as a project reference.

    The dependency on RazorCompile is needed because this will be called during publish on each P2P
    reference without calling RazorCompile for the P2P references.
  --><Target
    Name="_RazorGetCopyToPublishDirectoryItems"
    BeforeTargets="GetCopyToPublishDirectoryItems"
    DependsOnTargets="ResolveRazorGenerateInputs"
    Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnPublish)'=='true'"><!-- 
      This condition needs to be inside the target because it the itemgroup will be populated after the target's
      condition is evaluated.
    --><ItemGroup Condition="'@(RazorGenerate)'!=''"><AllPublishItemsFullPathWithTargetPath Include="@(RazorIntermediateAssembly->'%(FullPath)')"><TargetPath>%(Filename)%(Extension)</TargetPath><CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory></AllPublishItemsFullPathWithTargetPath><AllPublishItemsFullPathWithTargetPath Include="@(_RazorDebugSymbolsIntermediatePath->'%(FullPath)')"><TargetPath>%(Filename)%(Extension)</TargetPath><CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory></AllPublishItemsFullPathWithTargetPath></ItemGroup></Target><!--
    Called as part of CopyFilesToOutputDirectory - this target is called when building the project to copy
    files to the output directory.
  --><Target 
    Name="_RazorCopyFilesToOutputDirectory" 
    DependsOnTargets="_ResolveRazorTargetPath;RazorCompile"
    AfterTargets="CopyFilesToOutputDirectory"
    Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnBuild)'=='true'"><!-- Copy the Razor dll  --><Copy
      SourceFiles="@(RazorIntermediateAssembly)"
      DestinationFiles="$(RazorTargetPath)"
      SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
      OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
      Retries="$(CopyRetryCount)"
      RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
      UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
      UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)"
      Condition="Exists('@(RazorIntermediateAssembly)') and '$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true'"><Output TaskParameter="DestinationFiles" ItemName="_RazorAssembly"/><Output TaskParameter="DestinationFiles" ItemName="FileWrites"/></Copy><Message 
      Importance="High" 
      Text="$(MSBuildProjectName) -&gt; @(_RazorAssembly->'%(FullPath)')" 
      Condition="Exists('@(RazorIntermediateAssembly)') and '$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)'!='true'" /><!-- Copy the Razor debug information file (.pdb), if any --><Copy
      SourceFiles="@(_RazorDebugSymbolsIntermediatePath)"
      DestinationFolder="$(RazorOutputPath)"
      SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
      OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
      Retries="$(CopyRetryCount)"
      RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
      UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
      UseSymboliclinksIfPossible="$(CreateSymbolicLinksForCopyFilesToOutputDirectoryIfPossible)"
      Condition="Exists('@(_RazorDebugSymbolsIntermediatePath)') and '$(SkipCopyingSymbolsToOutputDirectory)' != 'true' and '$(CopyOutputSymbolsToOutputDirectory)'=='true'"><Output TaskParameter="DestinationFiles" ItemName="FileWrites"/></Copy><!--
    FastUpToDate check in VS does not consider the Views dll when determining if referencing projects need to be rebuilt.
    We'll touch a marker file that is used during as input for up to date check. Based on
    https://github.com/Microsoft/msbuild/blob/637f06e31ef46892faeb40044899a62a15b77f79/src/Tasks/Microsoft.Common.CurrentVersion.targets#L4364-L4368
    --><Touch Files="@(CopyUpToDateMarker)" AlwaysCreate="true" Condition="'@(_RazorAssembly)' != ''"><Output TaskParameter="TouchedFiles" ItemName="FileWrites" /></Touch></Target><!--
    Called after ComputeFilesToPublish and ComputeRefAssembliesToPublish but before CopyFilesToPublishDirectory - this target is called when 
    publishing the project to get a list of files to the output directory.
  --><Target
    Name="_RazorComputeFilesToPublish"
    AfterTargets="ComputeRefAssembliesToPublish"
    Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnPublish)'=='true' and '@(RazorGenerate)'!=''"><!-- If we generated an assembly/pdb then include those --><ItemGroup><ResolvedFileToPublish Include="@(RazorIntermediateAssembly)" Condition="'$(CopyBuildOutputToPublishDirectory)'=='true'"><RelativePath>@(RazorIntermediateAssembly->'%(Filename)%(Extension)')</RelativePath></ResolvedFileToPublish><ResolvedFileToPublish Include="@(_RazorDebugSymbolsIntermediatePath)" Condition="'$(CopyOutputSymbolsToPublishDirectory)'=='true'"><RelativePath>@(_RazorDebugSymbolsIntermediatePath->'%(Filename)%(Extension)')</RelativePath></ResolvedFileToPublish></ItemGroup><!--
      RazorGenerate items are usually populated from the '.cshtml' files in @(Content). These are published by default
      so all we need to do is exclude them. 
    --><ItemGroup Condition="'$(CopyRazorGenerateFilesToPublishDirectory)'=='false'"><ResolvedFileToPublish Remove="%(RazorGenerate.FullPath)"/></ItemGroup></Target><Target
    Name="_RazorRemoveRefAssembliesFromPublish"
    AfterTargets="ComputeRefAssembliesToPublish"
    Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnPublish)'=='true' and '$(CopyRefAssembliesToPublishDirectory)'=='false'"><!--
      The ref assemblies are published whenever PreserveCompilationContext is true, which we expect to be true for
      most usages of Razor. There's no setting that excludes just the ref assemblies, so we do it ourselves. 
    --><ItemGroup><ResolvedFileToPublish 
        Remove="%(ResolvedFileToPublish.Identity)"
        Condition="'%(ResolvedFileToPublish.RelativePath)'=='$(RefAssembliesFolderName)\%(Filename)%(Extension)'"/></ItemGroup></Target><Target Name="_CheckForMissingRazorCompiler" Condition="'$(IsRazorCompilerReferenced)' != 'true'"><Error
      Text="A PackageReference for 'Microsoft.AspNetCore.Razor.Design' was not included in your project. This package is required to compile Razor files. Typically, a
      transitive reference to 'Microsoft.AspNetCore.Razor.Design' and references required to compile Razor files are obtained by adding a PackageReference
      for 'Microsoft.AspNetCore.Mvc' in your project. For more information, see https://go.microsoft.com/fwlink/?linkid=868374." /></Target><Target Name="_ResolveRazorTargetPath"><PropertyGroup><RazorOutputPath Condition="'$(RazorOutputPath)'==''">$([MSBuild]::EnsureTrailingSlash('$(OutDir)'))</RazorOutputPath><RazorTargetDir>$([MSBuild]::Escape($([MSBuild]::EnsureTrailingSlash($([System.IO.Path]::GetFullPath('$([System.IO.Path]::Combine('$(MSBuildProjectDirectory)', '$(RazorOutputPath)'))'))))))</RazorTargetDir><!-- Example, c:\MyProjects\MyProject\bin\debug\MyAssembly.Views.dll --><RazorTargetPath Condition=" '$(RazorTargetPath)' == '' ">$(RazorTargetDir)$(RazorTargetName).dll</RazorTargetPath></PropertyGroup></Target><PropertyGroup Condition="'$(RazorDesignTimeTargets)'==''"><RazorDesignTimeTargets>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\Razor\Microsoft.NET.Sdk.Razor.DesignTime.targets</RazorDesignTimeTargets><RazorDesignTimeTargets Condition="!Exists('$(RazorDesignTimeTargets)')">$(MSBuildThisFileDirectory)Microsoft.NET.Sdk.Razor.DesignTime.targets</RazorDesignTimeTargets></PropertyGroup><Import Project="$(RazorDesignTimeTargets)" /><!--
    This is a hook to import a set of targets after the Razor targets. By default this is unused.
  --><Import Project="$(CustomAfterRazorSdkTargets)" Condition="'$(CustomAfterRazorSdkTargets)' != '' and Exists('$(CustomAfterRazorSdkTargets)')"/></Project>

Deploy error Deploy72002: Unable to connect to master or target server 'MYDB'.

$
0
0

Hello, i am getting the same error, My SQL server is 2017  and from my build server i am connect fine using SSMS and ODBC, i can also seen on the SQL Server logs that there is a failed login attempt:

"Login Failed with user 'fred'. Reason: Failed to open the explicitly specified database 'MYDB' : [CLIENT: xx.xx.xxx.xx] Ip of the build server

Any ideas?

how copy the file which in my project directory to the .exe file directory in windows when building

$
0
0
I develop a windows desktop app using visual studio qt addin plugin,I just want to copy a file which named '1.txt' in the project directory to the directory which the exe file in when building the project, what should I do, thanks a lot!

FIPS issues in Windows, .NET, and Visual Studio

$
0
0

FIPS issues in Windows, .NET, and Visual Studio

(These are some issues and work-arounds I found while working with System.Security.Cryptography with FIPS enabled. Just wanted to pass them on to help anyone in a similar scenario.)

FIPS (Federal Information Processing Standard) is a standard defined by NIST (National Institute of Standards and Technology) that specifies the security requirements for cryptographic modules. The FIPS standards are often required when working with government data.

The following Microsoft articles provide some information on enabling/disabling the option and the affect it has.

  • System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing" security setting effects in Windows XP and in later versions of Windows

    • Note that the "Managed" version of the System.Security.Cryptography classes will error with FIPS:

      "Microsoft .NET Framework applications such as Microsoft ASP.NET only allow for using algorithm implementations that are certified by NIST to be FIPS 140 compliant. Specifically, the only cryptographic algorithm classes that can be instantiated are those that implement FIPS-compliant algorithms. The names of these classes end in "CryptoServiceProvider" or "Cng." Any attempt to create an instance of other cryptographic algorithm classes, such as classes with names ending in "Managed," cause an InvalidOperationException exception to occur. Additionally, any attempt to create an instance of a cryptographic algorithm that is not FIPS compliant, such as MD5, also causes an InvalidOperationException exception."
  • Why We’re Not Recommending “FIPS Mode” Anymore (read: "by default")
    Microsoft has decided not to enable FIPS by default…"we’re not telling customers to turn it off – our recommendation is that it’s each customer’s decision to make."
    This is likely due to the complications and problems it can cause for individuals and corporations who do not need to comply with governmental regulations for data processing.

Enabling/Disabling FIPS in Windows

Use the Group Policy Editor (gpedit.msc), set the following option to "Enabled".

This will set the "Enabled" REG_DWORD value to 1 under the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy


Example and Resolving Issues with Visual Studio's Code Analysis

As stated above, the "Managed" cryptography classes are not FIPS compliant. For example, simply attempting to call the constructor for a SHA512Managed class will error:

Dim nonFIPSCompliantHasherAsNew System.Security.Cryptography.SHA512Managed()

The constructor, by design, throws an InvalidOperationException with a message like this: "This implementation is not part of the Windows Platform FIPS-validated cryptographic algorithms."

Instead, use one of the following:

               Dim cngHasherAsNew System.Security.Cryptography.SHA512Cng()

      Dim svcHasherAsNew System.Security.Cryptography.SHA512CryptoServiceProvider()

In some cases, such as RijndaelManaged, there may not be a valid implementation. This may require selection of a FIPS compliant alternative.

Note that the Microsoft Code Analysis functionality itself is not FIPS compliant. So, when enabling FIPS for testing in a development environment, you may receive compilation errors relating to this.

While it may take some trial and error, the work-around is to locate the related MSBuild.exe.config and disable the FIPS compliancy for it. For example, Visual Studio 2015 appears to use the following:

C:\Program Files (x86)\MSBuild\14.0\Bin\MsBuild.exe.config

Edit this file and in the <runtime> section, add/set the enforceFIPSPolicy option to false.

<configuration>                                                          
    <runtime>
        <!-- below tag will disable security policy checking for FIPS -->
        <enforceFIPSPolicy enabled="false"/>
    </runtime>
</configuration>

This same option can be used to disable FIPS enforcement in your application's app.config file. However, it's preferable to actually address your application's cryptography shortcomings rather than bypassing them.



C++ standards in Microsoft Visual C++ compilers

$
0
0

Hallo,

What standard C ++ set as default in vc8, vc9, vc10, vc11, vc12, vc14, vc15?

If the standard is not explicitlyspecified in project.

Application working fine with “Release” but custom solution configurations encounter bugs

$
0
0
I am deploying a mvc application on different environments regularly and as all environments have different ```web.config``` , so I use different different publish profiles for different branches for appropriate environments.

Problem is when I use ```Release``` configuration, application works fine, but when I use any of my custom build configuration that I use to have different ```web.config``` using ```xdt:transform```, some of the modules of Application stop working that will start working again if I use ```Release``` solution configuration.

I have

1.  compared published directory from both profiles in beyond compare and there are no orphans on either side.

2. compared configuration of configuration profiles in ```.csproj``` file

```Release``` configuration

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
     <Optimize>true</Optimize>
     <OutputPath>bin\</OutputPath>
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <IncludeIisSettings>false</IncludeIisSettings>
     <IncludeAppPool>true</IncludeAppPool>
     <DesktopBuildPackageLocation>\\vm02\QABuilds</DesktopBuildPackageLocation>
     <DeployIisAppPath>PROJ/MYAPP.MVC</DeployIisAppPath
     <DeployIisAppPhysicalPath>D:\TestDeploy\MYAPP.MVC</DeployIisAppPhysicalPath>
     <Prefer32Bit>false</Prefer32Bit>
     <FilesToIncludeForPublish>AllFilesInTheProject</FilesToIncludeForPublish> 
    </PropertyGroup>

Custom Configuration

    <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'DevOpsCustom|AnyCPU'">
        <DebugType>pdbonly</DebugType>
        <Optimize>true</Optimize>
        <OutputPath>bin\</OutputPath>
        <DefineConstants>TRACE</DefineConstants>
        <ErrorReport>prompt</ErrorReport>
        <WarningLevel>4</WarningLevel>
        <IncludeIisSettings>false</IncludeIisSettings>
        <IncludeAppPool>true</IncludeAppPool>
        <DesktopBuildPackageLocation>\\vm02\QABuilds</DesktopBuildPackageLocation>
        <DeployIisAppPath>PROJ/MYAPP.MVC</DeployIisAppPath>
        <DeployIisAppPhysicalPath>D:\TestDeploy\MYAPP.MVC</DeployIisAppPhysicalPath>
        <Prefer32Bit>false</Prefer32Bit>
        <FilesToIncludeForPublish>AllFilesInTheProject</FilesToIncludeForPublish>
      </PropertyGroup>

 
What I need to ask is what else I can check, I have tried deleting and making custom profiles from fresh but with no luck. I can't think of another solution to efficiently manage multiple ```web.config``` files. Any help would be appreciated. 

Duplicate key row error with Team Foundation Server 2015 Build Server

$
0
0

My build server has been up and running for years without any problems. A couple weeks ago I started getting an intermittent error when building.

Cannot insert duplicate key row in object 'Task.tbl_AgentRequest' with unique index 'IX_Task_tbl_AgentRequest_PoolId_QueueTime'. The duplicate key value is (1, 10, 2018-12-20 19:47:17.6700000).

Doing a little research others have had this issue with varying degrees of success trying to fix it.

Things I have tried to try to fix this without success:

1) Rebooted TFS and the Build Server.

2) Deleted all Agent Pools, Agent Queues, and Agents and recreated them new.

3) Deleted all build scripts and recreated them new.

4) Modified the build scripts and unchecked the "Parallel" option in the Multi-configuration setting.

None of these things has fixed the problem, it is still occurring.

What I have discovered from investigating the problem on my server is that the build server is incorrectly starting 2 different builds at the same time.

For example:
Say I have 2 build Scripts A & B, each with 2 Build Configurations 1 & 2.
Both build scripts are queued to build at the same time.

The build agent start building "A-1".   "A-2" shows as queued.

The "All build definitions" screen "Queued" builds shows:
Build script A as Building
Build script B as Queued

When "A-1" finishes that is when the error occurs.

That is, what happens next seems to be randomly one of 4 possible outcomes:
a) B-1 starts building & A-2 remains Queued (is ok)
b) A-2 starts building & Script B remains Queued (is ideal)
c) B-1 starts building & A-2 has the duplicate key error and fails (is bad)
d) A-2 starts building & B-1 has the duplicate key error and fails (is bad)

The error appears to be that the 2nd build configuration and the next queued build script are both simultaneously starting on the same build agent resulting in one of them getting the error.

Again, this error has recently started happening on builds that have been good for years now.  Prior to the errors the builds would always complete all build configurations before moving on to the next queued build script.

This is on Microsoft Visual Studio Team Foundation Server Version 14.114.27412.0

Any help solving this issue is greatly appreciated.  Thanks!

Mongo C++ driver in visual studio

$
0
0

Hi, I have installed Mongo C++ driver and trying to build an application using this driver. But I'm hitting this error. Can anyone help with this?

error MSB3073: :VCEnd" exited with code 1

Error MSB4175

$
0
0

Hello, please help me with fixing this error .When I run project in output I have this massage:

 C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(219,5): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Build.Tasks.Core.dll". Syntax error in file name, folder name or volume label.

Please help me .

/t:SqlSchemaCompare - Where I can find some info about it

$
0
0

/t:SqlSchemaCompare

Is it like on Visual Studio when doing Compare Schema ?

I have only https://blogs.msdn.microsoft.com/ssdt/2014/07/15/msbuild-support-for-schema-compare-is-available/

Thanks

HELP BUILDING A Xamarin CrossPlatform Project for Android

$
0
0

I recently started to develop in Xamarin, so I don't know how to fix this kind of errors, I'll be glad for receive any help. Thanks

This is the error:

Severity    Code    Description    Project    Project Rank    File    Line    Suppression State
Error        The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
   at System.IO.PathHelper.GetFullPathName()
   at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.GetFullPathInternal(String path)
   at Xamarin.Android.Tools.Files.ExtractAll(ZipArchive zip, String destination, Action`2 progressCallback, Func`2 modifyCallback, Func`2 deleteCallback, Boolean forceUpdate)
   at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection`1 jars, ICollection`1 resolvedResourceDirectories, ICollection`1 resolvedAssetDirectories, ICollection`1 resolvedEnvironments)
   at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()    GuasaveDigitalApp.Android    1            


Using MSBUILD for SSRS project

$
0
0

Hi,

We are using TeamCity for our builds and I'd like to add in the capability to build from an SSRS project (rptproj).  At the moment this is failing while invoking MSBUILD with the following error:

error MSB4226: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\Reporting Services\Microsoft.ReportingServices.MSBuilder.targets" was not found.

The TeamCity box has 'Visual Studio Build Tools 2017' installed.  My predecessor managed to get this configured to build DACPACs (sqlproj); I'm not sure exactly how.

The much referenced post about support for SSRS with MSBUILD (https://blogs.msdn.microsoft.com/sqlrsteamblog/2017/09/25/msbuild-support-for-reporting-services-projects-now-available/) says that the intention is to enable using MSBUILD without having Visual Studio installed.  Yet the associated download for 'Reporting Services Projects for Visual Studio 2017' leads to a VSIX file which, as far as I know, can only be installed into a Visual Studio instance.

So I wonder how best to proceed.  I looked at the GUI for 'Visual Studio Build Tools 2017' (via Programs and Features, Change.  But there's no option there to add elements for SSDT.

The blog post referenced above shows a list of dlls required.  Again, the path suggests that an instance of Visual Studio is required.

I could (and will) install Visual Studio if required.  But if there's a cleaner way to achieve the same end just with MSBUILD and/or 'Visual Studio Build Tools 2017' that would be preferable.

Most grateful for any guidance.

Thank you

Sebastian

TFS builds failed with Exit code -2146232576

$
0
0

I’m trying to query a new build for new set up build machine of the TFS 2017. Installed Visual Studio 2015 and 2017. Downloaded agent from TFS 2017.

I'm getting the following error message:

Exit code -2146232576 returned from process: file name 'tf', arguments 'vc

How could I resolve this error?

TFS builds failed with Exit code -2146232576


What does the line "Debug|Any CPU = Debug|Any CPU" in the .sln file mean?

$
0
0

The following is in the .sln file by default when a new desktop project is created in Visual Studio (I know, this is the MSBuild forum, but the two are tightly coupled):

    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection

I also know how modifying certain solution properties in Visual Studio updates the above section.

My question is this: What is the meaning of Debug|Any CPU equals Debug|Any CPU?  Would there ever be a case whereDebug|Any CPU equals Release|Any CPU?  If not, why have this?

In similar fashion, what does "GlobalSection(SolutionConfigurationPlatforms) = preSolution" mean?  There is no source on MSDN that explains what preSolution and postSolution (used in .sln files) mean.

Thank you.

How to suppress this warning?

$
0
0

How can this build time warning be fixed/suppressed?

At build time, the following warning is generated:

A custom tool 'TextTemplatingFileGenerator' is associated with file 'Models\SecurityKey.tt', but the output of the custom tool was not found in the project.  You may try re-running the custom tool by right-clicking on the file in the Solution Explorer and choosing Run Custom Tool.

This warning is the result of a prebuild event command line which generates a temporary file that exists just long enough to be included in the build of a project and then it is deleted. Since the file exists neither before nor after a build it cannot be added to the project and thus it is unclear how to get rid of the reason that the warning is generated. Is there some way to suppress the error? The normal method, a #pragma, won't work in this case because no warning number is issued in association with the warning itself.



Richard Lewis Haggard

VS15/17 error APPX1639: missing file "MakePri.exe"

$
0
0

Hello. I've been trying to fix this issue already for about 3 days. Im trying to start basic UWP application in Visual Studio 15 Enterprise (also tried Vs 17 from ms imagine), blank one without adding or changing anything to it. The problem is I cannot run/debug it since it always throws error APPX1639. Im running it on a Windows 10 Educational version. I've upgraded my win 7 to win 10 pro then switched trying to fix this error to the edu version. (Used Microsoft Creation Tool to upgrade from win 7)

In both Vs 15 and 17 results are the same except it targets different Microsoft.AppXPackage.Targets file for proper version.

For example error from VS 17. (It's in Polish but basicaly it says error APPX1639: missing file "MakePri.exe". To get more information visit...

1>E:\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(967,5): error APPX1639: nie odnaleziono pliku „MakePri.exe”. Aby uzyskać więcej informacji, zobacz http://go.microsoft.com/fwlink/?LinkID=798187.

So what i've tried was:

First, I've checked if there's WindowsSdkDir entry in system's environment variables. (There isn't)

Then, installing different SDK versions so I've get myself: 10.0.15063 and 10.0.26624 both failed and didn't change anything.

I've tried to repair,modify,uninstall VS 15, that also didn't help. Tried to install new MSBuild Tools. Then I've installed VS 17, now im here.

Also win developer option is turned to on.

Viewing all 2763 articles
Browse latest View live


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