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

TFS Build Using Code-Signing Certificate

$
0
0

We've purchased a Symantec code-signing certificate that we've been using to sign UWP appx packages.  Our packages are not uploaded to the Microsoft Store.  The certificate was imported in the Certificates MMC snap-in and previously we've been able to get by using local MsBuild batch commands to regularly do automated builds.

We've now moved the build process to TFS 2018 and pretty much everything builds except during code-signing.  We only have one build agent and we've imported the signing certificate the same way.  But during build we can't get past this error:

Error APPX0102: A certificate with thumbprint 'B80368DE4FB5D9E200570DFE73638C48F5CEB026' that is specified in the project cannot be found in the certificate store. Please specify a valid thumbprint in the project file.

We can clearly see that the certificate is installed on the build agent, and all csproj files specify the correct thumbprint.

    <PackageCertificateThumbprint>B80368DE4FB5D9E200570DFE73638C48F5CEB026</PackageCertificateThumbprint>

Several solutions we've seen but they're either adding another build step or using a secret store.  We're just not sure why the same build process cannot work in this case.  The build agent is on-premises.



umdf2 sample project fails to build

$
0
0

I followed this article

https://docs.microsoft.com/en-us/windows-hardware/drivers/gettingstarted/writing-a-umdf-driver-based-on-a-template

and when I build the following error is shown.

Project is not up-to-date: 'C:\Users\User\source\repos\UmdfDriver\UmdfDriver\x64\Debug\UmdfDriver.tlog\UmdfDriver.lastbuildstate' file is missing.


Visual studio: Error Invalid static method invocation syntax

$
0
0

error : Invalid static method invocation syntax: "[MSBuild]::IsRunningFromVisualStudio()". Method '[MSBuild]::IsRunningFromVisualStudio' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(ab)). C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets

Can not create any new python application or open existing application?

Please help me out

thanks

Mahesh S

Builds resetting Test suites

$
0
0
We have shifted from XAML builds to TFS builds and are using on-premises TFS 2017.  We are finding that our test suites are having the state of test cases in a test suite set from pass or fail back to active.  We'd prefer this to not occur.  None of the builds are connected to automated tests and the retention option to delete automated test results is not set.  We assume this behavior is caused by the build identifying code changes that are associated with a requirement and resetting the test cases associated with that requirement. 

MSB3073:The command "copy XXXXXXXXXXXXXXXXXXXXXX"

$
0
0
I'm geeting this error when im trying to post build event for code virtualizer.

MSB4057: The target "RazorCoreGenerate" does not exist in the project.

$
0
0

asp.net core 2.2

Created new app with: donet new mvc

build with: dotnet buld

get: MSB4057: The target "RazorCoreGenerate" does not exist in the project

Help required to convert a .dll file in to the source code

$
0
0
Hi everyone, 


I am trying to decode a .dll file in to C++ file. I tried several ways but couldn't able to do it. I also tried these steps which were mentioned by someone, i.e., 

Hi,

I think you have downloaded the .NET Reflector & this FileGenerator plugin , If you do,

Open up the Reflector.exe,
Go to View and click Add-Ins,
In the Add-Ins window click Add...,
Then find the dll you have downloaded FileGenerator.dll (witch came wth the FileGenerator plugin),
Then close the Add-Ins window.
Go to File and click Open and choose the dll that you want to decompile,
After you have opend it, it will appear in the tree view,
Go to Tools and click Generate Files (Crtl+Shift+G),
select the output directory and select appropriate settings as your wish,
Click generate files.
Reply if success,

Thanks & Good luck!



By doing this, I get an error message as "ABC.dll' is not a .NET module. I  will be very thankful if some one please help me to decode the .dll file in to the source codes. The source code has one C++ file and two header files. 


Cheers,

Umair

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>


MSB3073 - Source Engine Modding Problem

$
0
0

I recently downloaded the source code for Valve's Source Engine to do some modding.  To make changes I edit .cpp files in the solution (which is called games.sln) and then compile, and copy two .dll files that are outputted into the folder that I am storing my mod in.  Without making any changes to the code this error popped up one day, and I really have no idea how to fix it.  I've seen other people's questions but they haven't applied to this situation.  Here is the error message it gives me:

ErrorMSB3073The command "if EXIST ..\lib\public\.\mathlib.lib ( for /f "delims=" %%A in ('attrib "..\lib\public\.\mathlib.lib"') do set valveTmpIsReadOnly="%%A"
) else ( if not EXIST ..\lib\public\. mkdir ..\lib\public\. )
set valveTmpIsReadOnlyLetter=%valveTmpIsReadOnly:~6,1%
if "%valveTmpIsReadOnlyLetter%"=="R" (
    attrib -r ..\lib\public\.\mathlib.lib
    ..\devtools\bin\gnu\touch.exe -d "1999-01-01" ..\lib\public\.\mathlib.lib
    attrib +r ..\lib\public\.\mathlib.lib
)
if exist "..\devtools\bin\vpc.exe" "..\devtools\bin\vpc.exe" -crc2 "mathlib.vcxproj"
if ERRORLEVEL 1 exit /b 1

:VCEnd" exited with code 1.mathlibC:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets

The error message appears for every project in the solution.  I have a screenshot of the problem but for some reason Microsoft insists my account isn't verified so I can't post it.

Our code is not building on the latest version of Visual Studio 2017

$
0
0

Hi,

Our code uses <g class="gr_ gr_152 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="152" id="152">postsharp</g> and we are importing the <g class="gr_ gr_203 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="203" id="203">postsharp</g> target by adding the below lines in the project file.

  <Import Project="..\packages\PostSharp.4.2.24\tools\PostSharp.targets" Condition="Exists('..\packages\PostSharp.4.2.24\tools\PostSharp.targets')" />
  <Target Name="EnsurePostSharpImported" BeforeTargets="BeforeBuild" Condition="'$(PostSharp30Imported)' == ''">
    <Error Condition="!Exists('..\packages\PostSharp.4.2.24\tools\PostSharp.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://www.postsharp.net/links/nuget-restore." />
    <Error Condition="Exists('..\packages\PostSharp.4.2.24\tools\PostSharp.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://www.postsharp.net/links/nuget-restore." />
  </Target>
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 

When we build the project in Visual Studio 2017 15.0 it works perfectly, however, if we try the same on version 15.8 and later then it outputs the following error

SeverityCode DescriptionProjectFileLineSuppression State
ErrorCS0006 Metadata file 'ConfigurationManagement.dll' could not be foundConfigurationManagementCSC1Active


Elangovan

build.proj file does not work with VS17 community edition

$
0
0

Below is the start of my build file
It just doesn't work with Visual Studio 2017 Community edition.

1) What is the correct value for $(VCTargetsPath)

2) How do I tell this to my build.proj file?

<?xml version="1.0" encoding="utf-8"?>
<Project
        DefaultTargets="Build"
        ToolsVersion="4.5"
        xmlns="http://schemas.microsoft.com/developer/msbuild/2003">


    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Win32.targets" />

            

devops pipeline build error in dotnet desktop application

$
0
0

Hi I am David! 
actually I am not a programmer.
I just work for small manufacturer and I like programming with C#, just beginner.
recently I am developing our PDF Document file view application.
I am using Com Componet Adobe PDF Reader.
it is working well and no problem building in visual studio 2017 community.
But when I using in DevOPs PipeLine, below Error message in Build Solution.
I struggling with it almost 2 weeks Please Help.

1. Waring Message
##[warning]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2729,5): Warning MSB3284: Cannot get the file path for type library "05bfd3f1-6319-4f30-b752-c7a22889bcc4" version 1.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))

2. Error Message
##[error]WindowsFormsApp1\Form1.Designer.cs(60,17): Error CS0246: The type or namespace name 'AxAcroPDFLib' could not be found (are you missing a using directive or an assembly reference?)
Form1.Designer.cs(60,17): error CS0246: The type or namespace name 'AxAcroPDFLib' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\WindowsFormsApp1\WindowsFormsApp1.csproj]

I found similar error in internet and I tried but I can't.
I want to using DevOps.
Bye


VS2017 Build Error The process cannot access the file

$
0
0

Hello,

I am running VS2017 version 15.3.3.  I just updated it yesterday in an attempt to resolve this issue.  When I attempt to build a C# WPF project for a second time, I get a build error telling me the .EXE file is in use by another process.  Closing the solution and reopening allows me to build the project.  This is very annoying and unproductive.  

This only occurs after I edit and save the MainWindow.xaml file.  I have also tried closing the xaml file before attempting the second build without any success.  

Error_CS0029_Cannot implicitly convert type 'int' to 'string'

How can I make MSBUILD take the PostBuildEvent changes into account when determining if a target is out of date and needs to be rebuilt?

$
0
0

I have a <PostBuildEvent> that does both .NET strong name signing and signcode digital signature signing for my output dll.

This causes MSBUILD to always re-link and then call the post build event each time a build is run, even if there have been no actual changes to the source files.

The post build event looks like this:

    <PostBuildEvent>
      <Command>
        "$(TargetFrameworkSDKToolsDirectory)x64\sn.exe" -Ra $(TargetPath) $(ProjectDir)\..\Include\mykey.snk
        "signtool.exe" sign /p <password> /f mycred.pfx /fd SHA256 /a $(TargetPath)
      </Command>
    </PostBuildEvent>

How can I make MSBUILD take the PostBuildEvent changes into account when determining if a target is out of date and needs to be rebuilt?


Create an Installer file in .Net which runs on all browsers

$
0
0

I have an application that is made in .Net which is a client side code deployed at the server. This code is responsible for providing the private key token from the PC and sign a file digitally.

As this code is deployed at the server side, a Java applet is used for taking private key from attached token during process.The limitation of applet is, It runs only internet explorer.

So I am planning to make an installer in .Net using Visual Studio installer project. Being new in this, I just wanted to know some few basic things:

1.) How to make sure the installer made in dot net can be run with all browsers?.
2.) Installer can be downloaded from web?.
3.) Should be one click deploy

Any suggestions or recommendations or useful links for the above would be great.

Thanks In Advance!!!..


error C2065

$
0
0

>c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\d3d10.h(1654): error C2065: 'default': nichtdeklarierter Bezeichner

This came up when compiling StdAfx.cpp from an old dll. My problem: d3d10.h is not included by my headers; hence I have no idea where I could amend anything. The dll compiled well a couple of hours ago and only code was changed, headers remained untouched.

Thanks a lot for any assistance.

How to generate the lib using the res file?

$
0
0

Hi,

I do the following things. Create a Manifest file called abcd.man by hand using a editor. Then I do

mc -um abcd.man

That will generate abcd.rc, abcd.h and 2 bin files

Then I do rc.exe abcd.rc which will give me abcd.res file

Then I do link.exe  /dll /noentry /machine:x64 abcd.res /OUT:abcd.dll

That will get me abcd.dll. 

Now I have a abcd.c program which has to be compiled to generate a abcd.exe. 

This abcd.exe will dynamically load abcd.dll and work. However to build abcd.c I need abcd.lib to link during build. 

So I did link.exe  /lib /machine:x64 abcd.res /OUT:abcd.lib

I am using VS2017 and linking abcd.lib but VS2017 says the lib is bad. 

Question1: What is the correct syntax to generate a lib using a res file in command line? 

Question2: Suppose I generate the lib file successfully I would like to build the exe too on the command line. Then I don't have to worry about VS2017. Is this is the correct syntax

cl.exe abcd.cs /lib=abcd.lib /OUT:abcd.exe??

Question3: I have Googled a lot and had a feeling I can totally skip all the command line operation and just using abcd.man and abcd.c go to abcd.exe straight. That would be ideal. However I could not figure out how to embed abcd.man in VS2017. Wasted lot of time. If you can answer Q3 then Q1 and Q2 I really dont care. 

Kindly advice. 

Thanks in advance


VCLibs has no msvcp140d_app.dll

$
0
0

I'm trying to compile and run my executable for both Debug and Release modes for testing. However I've encountered an issue of a missing dll for `msvcp140d_app.dll` and `msvcp140_app.dll` for debug and release modes respectively.

I'm using Visual Studios 2017 on Windows 10 using x64.

I've checked the WindowsApps folder and can only find the non `_app` versions. 
I've also downloaded the installed packages from `C++ Runtime v14 framework package for Desktop Bridge (Project Centennial)`
which provided the `msvcp140_app.dll` but no debug version.

Also sorry if this isn't the correct tag and please point me to the correct forums for this problem.

Is it possible to Create a TestCase Item using API

$
0
0

I am trying to create an API for creating new Test Cases in TFS using POSTMAN and have not been successful so far.

I would like to understand if the TFS API supports creating test cases this way.

Thanks,

Malini

Viewing all 2763 articles
Browse latest View live


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