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

Aspnet_compiler / ASPRUNTIME Build could not find file in a ShadowCopy folder – Huh ??

$
0
0

Hi all,

I am using Visual Studio 2019 Web Deploy an ASP.NET MVC app with “Precompile During Publishing” (and not allowing site to be updatable).

During the Deployment Web Deploy calls the aspnet_compiler as follows:

3>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source -c C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\TempBuildDir

During that aspnet_compiler compilation  (or pre-compilation) I am getting the following error:

3>error ASPRUNTIME(0,0): Error message: Could not find file 'C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source\App_Data\TEMP/uCommerceAppsAssemblyShadowCopy\DF65C9D81126DFE36C13305B42A62905'..

I currently have \App_Data\TEMP\uCommerceAppsAssemblyShadowCopy\  “Excluded” from project because  from what I understand it is only needed at run time to copy assemblies to so they can be opened from there, so as to avoid locking the master copies. This to allow for web site update as described at https://docs.microsoft.com/en-us/dotnet/framework/app-domains/shadow-copy-assemblies . 

Because it is “Excluded” from project this folder does not exist in the “Source” folder used as and input to aspnet_compiler.exe. To be precise I checked and can confirm that the folder C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source\App_Data\TEMP/uCommerceAppsAssemblyShadowCopy\ does not exist.

Further more a text search on the content of all files in C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source does not find any file or file name containing the string “uCommerceAppsAssemblyShadowCopy”

So given that the only input to  aspnet_compiler.exe is the physical path of the “Source” folder   ( -p C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source ), why does, and how does aspnet_compiler.exe even know to look for 'C:\Clancy\A_TeraTastic\Dev\TT15\TeraTastic\obj\TTRelease\AspnetCompileMerge\Source\App_Data\TEMP/uCommerceAppsAssemblyShadowCopy\DF65C9D81126DFE36C13305B42A62905'.. ?  Huh - does not make sense to me ?

Also note in the error message above one of the folder delimiters is a “/” while the rest are “\” why is that ? and is it a problem ?  Right not I am assuming it is not a problem because similar paths are opened by Windows Explorer without issue.

Also FYI for reference docs on aspnet_compiler.exe and related command line switches see  https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-3.0/ms227976(v=vs.85)  

Any assistance understanding or solving this problem would be appreciated...

Terry Clancy

ClanceZ


Terry Clancy


VS2019 MSB4019 error

$
0
0

The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 10.2.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\\BuildCustomizations\CUDA 10.2.props" is correct, and that the file exists on disk. yolo_cpp_dll C:\Yolo_v4\darknet\build\darknet\yolo_cpp_dll.vcxproj 55 


Error MSB3073 The command npm run build exited with code 9009

$
0
0

Good day,

I am using VS2019 utilizing an ASP.NET CORE MVC Template. When I try to build solution, the build failed and the following error message displayed:

Error MSB3073 The command "npm run build" exited with code 9009.

May I please be advised on how to treat with this error.

Visual Studio 2019 Build issue

$
0
0

While building solution which has VB.NET standard projects and Core 3.1 projects, I am getting following error for all new core projects: XXXXXX.csproj.metaproj: The project file "XXXX.csproj" is not supported by MSBuild and cannot be built.

I have the following settings but still getting error message:
- Build definition - Process - Advanced - Agent Settings - Tags Filter ---  VS2019_4.8 is selected
- Tag Comparison Operator ---- MatchAtLeast

What should I do to build the solution for all projects ?


Thanks, AT


Issue with Building Solution in an SVN Branch of Multibranch Jenkins Pipeline

$
0
0

I have a .Net Standard 2.0 solution. The solution is in a folder and the project file is in a sub folder. It has just one class file and a simple method Add which adds 2 numbers and returns the result.

I have the same project and the solution under Trunk and a couple of SVN Branches. (1.0.0.0 and 2.0.0.0). I am trying to setup a Multibranch Pipeline in Jenkins. For each branch, there is a Jenkinsfile and when I scan Jenkins, it automatically creates a new job for every branch. So far good. Now, when I try to build the solution from Jenkinsfile, it keeps failing. For branches, Jenkins creates a folder structure for the workspace like Job_Name\branches%2FMyFolder%2F1.0.0.0. Within this folder it downloads the source code. To rule out Jenkins issues, I logged into the Build server directly, opened PS as Admin and navigated to this directory which has .sln file and when I run "dotnet restore", I get the error that the project file was not found. Also, it is looking for the project file in a different directory. I tried to check the solution file, but it has only relative path. I am not sure where it is looking for the absolute path. However, if I run dotnet restore <Path_Of_Project_File>, it runs. 

Then when I run msbuild MySolution.sln (msbuild TestClassLib.sln -verbosity:m -restore -t:clean,build /p:Configuration=Release /p:WarningLevel=0 /p:DebugSymbols=false /p:DebugType=none /p:RestoreForce=true), it fails with the following errors.  

AssemblyInfo.cs(18,12): error CS0246: The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?

TestClassLib.AssemblyInfo.cs(14,55): error CS0518: Predefined type 'System.String' is not defined or imported 

Can anyone please help?


Ven

tbl_content size growth is uncontrollable in TFS 2013

$
0
0

Hi All,

We are facing issues related to the tbl_content table in TFS 2013. Its size has been increasing exponentially and is not controllable. Any one has proven solution to decrease the size will be helpful.

Thanks

Deepak

Cmd.exe exited with code '255' on ExportRelease Stage of deployment

$
0
0
I am trying to deploy code that has been deployed before. Now I am getting: Cmd.exe exited with code '255' on ExportRelease Stage of deployment. Any ideas why?

Create Pull request from visual studio

$
0
0

Hi ,

I am creating pull request to push changes to azure devops using visual studio so i have added 'Sp_executesql' in my store procedure it working fine on SSMS but getting error as " undefined reference in visual studio "


Visual studio error

$
0
0

Hi, When I try to build  project  using visual studio 2017 I got the following error 

SeverityCode DescriptionProjectFileLineSuppression State
ErrorMSB4019 The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations\CUDA 10.1.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.DepthSensingD:\scannet_for_ios-develop\scannet_for_ios-develop\VoxelHashing\DepthSensingCUDA\DepthSensing.vcxproj36

   

I tried to fix the error by many ways but no luck, if I get suggetion about how to fix this error that would be very helpful thanks in advance 

Do .NET Full-Framework SDK style projects still support ClickOnce?

$
0
0

We've recently started to migrate our .NET Full-Framework (net472) projects to the new SDK-style project format. Some tools were previously distributed usingClickOnce and we just manually deployed them from Visual Studio in the project settings' "Publish" tab.

<TargetFramework>net472</TargetFramework>
Even though all the MSBuild properties are still in place in the .csproj file (e.g.PublishUrl, PublisherName, ...)  Visual Studio doesn't seem to detect that it's a ClickOnce application anymore and the "Publish" tab is gone.

When calling msbuild /t:publish ... the application is just published to the "normal" output directory into theapp.publish folder. No .application or other deployment files are created. To me it seems like Visual Studio is just assuming that it should "dotnet publish" if it's an SDK-style project.

Maybe ClickOnce support was explicitly dropped? I couldn't find any official announcement on this.

[Announcement] "MSBuild" Forum will be migrated to a new home on Microsoft Q&A!

$
0
0

This "MSBuild" Forum will be migrated to a new home on Microsoft Q&A!

We've listened to your feedback on how we can enhance the forum experience. Microsoft Q&A allows us to add new functionality and enables easier access to all the technical resources most useful to you, like Microsoft Docs and Microsoft Learn.

Now until August 16, 2020:

From August 17, 2020 until August 31, 2020:

  • New posts - We invite you to post new questions in the "MSBuild" forum's new home on Microsoft Q&A. The current forum will not allow any new questions.
  • Existing posts - Interact here with existing content, answer questions, provide comments, etc.

August 31, 2020 onward:

  • This forum will be closed to all new and existing posts and all interactions will be on Microsoft Q&A.

We are excited about moving to Microsoft Q&A and seeing you there.

Learn More


Setting a preprocessor based on property set in target.

$
0
0

So we have a variable which is currently an environment var and on loading of the sln it uses that variable to determine which project is active and selects certain things specific to that project (Preprossor define) 

So this preprocess define lets call it GAME_1 or GAME_2 gets set. We have a tool we have created where we can load variables from an ini from a dll. So inside a target I can find out if it is game 1 or game 2 without needing the environment varaible. 

So my issue is I can't get the preprocess to recognise the change. So in our earliest target we set this. 

<UsingTask AssemblyFile="$bin\IniVars.dll" TaskName="msbuild.IniVarsInit" /><Target Name="SetGameItentifier"><IniVarsInit><Output TaskParameter="IniVars" ItemName="IniVars"/></IniVarsInit>    <PropertyGroup><GameItentifier>%(IniVars.GameIdentifier)</GameItentifier></PropertyGroup><Message Text="GameItentifier: $(GameItentifier)" /></Target>

and the preprocessor are included in a props file. 

<ItemDefinitionGroup>        <ClCompile><PreprocessorDefinitions Condition="'$(GameItentifier)' == 'game1'">GAME_1;%(PreprocessorDefinitions)</PreprocessorDefinitions><PreprocessorDefinitions Condition="'$(GameItentifier)' == 'game2'">GAME_2;%(PreprocessorDefinitions)</PreprocessorDefinitions></ClCompile></ItemDefinitionGroup>

So my question is how would it be possible to get those preprocessor values set from the GameItentifier value. I have it set in the default root props file and we overwrite it in the target. 

Thanks!

Chris

Creating MSIX package From UWP windows application

$
0
0

I found 3 ways to creating MSIX Package from UWP windows application.

1. Using  MSIX Pacakaging Tool - But Got Error As MSIX pakage failed to run.(But created MSIX file.And Able to installed the pacakage.Not able to Run the application.).

2.Using Advanced Installer extension - It Also Created MSIX file. but After the install. not able to run the application. got the error as sharedLIbrary.dll not found

3.USIng Command line - Its not able to create the msixpakage

Please find the solution for creating the msix pacakage file

Setting Microsoft (R) C/C++ Optimizing Compiler C standard version

$
0
0

Hi, 

For my project  I'm using the

Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64

I was wondering if there's a way to set the C standard version that the compiler uses. 

Thank you,

James Pedersen

Using SignFile on Multiple Files/Paths at once?

$
0
0
I was just wondering if it's at all possible to use the SignFile MSBuild Task to sign multiple files at once? Can you simply specify a path or location and have all files in that location signed? Any help is greatly appreciated, thanks again!

WPF Problem I need Help about this

$
0
0
SeverityCodeDescriptionProjectPathFileLineSuppression State
ErrorThe "ResourcesGenerator" task failed unexpectedly.
System.ArgumentException: Illegal characters in path.
   at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
   at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
   at MS.Internal.Tasks.TaskHelper.CreateFullFilePath(String thePath, String rootPath)
   at Microsoft.Build.Tasks.Windows.ResourcesGenerator.ValidResourceFiles(ITaskItem[] inputFiles)
   at Microsoft.Build.Tasks.Windows.ResourcesGenerator.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()Otsutsuki

Where is MSBuild finding .metaproj

$
0
0

I have a solution that I can build from Visual Studio. Configuration manager is set to build "QL Release | Win32".   I saved all after building in Visual Studio 2013.

I tried a command line build:

"C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" /nologo /p:Configuration="QL Release" /verbosity:detailed /t:Rebuild /fileloggerparameters:LogFile="d:\myProduct\windows_build_logs\QL_out.txt"  "d:\myProduct\mySolution\QL.sln"

The logfile references a non-existent ".metaproj" file:

Build started 5/7/2015 5:31:04 PM.
Project "d:\myProduct\mySolution\QL.sln" on node 1 (Rebuild target(s)).
Building with tools version "2.0".
Target "ValidateSolutionConfiguration" in file "d:\myProduct\mySolution\QL.sln.metaproj" from project "d:\myProduct\mySolution\QL.sln" (entry point):
Using "Error" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "Error"
d:\myProduct\mySolution\QL.sln.metaproj : error MSB4126: The specified solution configuration "QL Release|X64" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [d:\myProduct\mySolution\QL.sln]
Done executing task "Error" -- FAILED.
Done building target "ValidateSolutionConfiguration" in project QL.sln" -- FAILED.
Done Building Project "d:\myProduct\mySolution\QL.sln" (Rebuild target(s)) -- FAILED.


Build FAILED.

"d:\myProduct\mySolution\QL.sln" (Rebuild target) (1) ->
(ValidateSolutionConfiguration target) -> 
  d:\myProduct\mySolution\QL.sln.metaproj : error MSB4126: The specified solution configuration "QL Release|X64" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [d:\myProduct\mySolution\QL.sln]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.06

I don't know where it is getting the ".metaproj" file as there isn't one.  I've done a clean, even removed the QL.sdf and QL.v12.suo files, but the command line build still wants to build a non-existent configuration.  That configuration most likely came from some experimental work which has since been removed. The solution contains 10 projects.  None of the project or solution files reference x64 so I can't tell where MSBUILD is getting this information.


build server not finding nuget package

$
0
0

We are setting up a CI server for our UWP app and the build fails when using a system accout.

almost identical to:  https://stackoverflow.com/questions/43276107/jenkins-not-finding-a-nuget-package

I'm setting a Jenkins CI server. I got the first step to run properly:

nuget restore -NonInteractive  -ConfigFile Nuget.config -Verbosity Detailed -NoCache

That works properly, but when I want to compile the app with:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe

and ${WorkSpace}\src\Weather.App.csproj It throws this error:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(178,5): error : The package HockeySDK.Core with version 4.1.6 could not be found in C:\WINDOWS\system32\config\systemprofile\.nuget\packages\. Run a NuGet package restore to download the package. [C:\Program Files (x86)\Jenkins\workspace\MyApp\Weather\Weather.App.csproj]

The weird thing is that it the Hockey package clearly exists in the path: 


a flishhorse fellow

Azure Devops Build Pipelines - How to include XAML task in the build agent?

$
0
0

Hi All,

I am creating a new Azure Devops Build pipeline where i already have TFS XAML builds in place, i am looking for relevant task to invoke the already built XAML builds, but when i search over tasks over AzureDevops server i do see tasks as MSBuild, PowerShell, Maven and many more but i don't see any task to invoke XAML.

Can someone please help me as how this can be achieved?

Also looking at the existing XAML build i realized that it invokes Microsoft.TeamFoundation.Build.Workflow.Activities.TfsBuild as the core task and rest all are supporting tasks, hence in case if whole XAML can't be invoked, is there a way to invoke TfsBuild in Azure Devops Build pipelines?

Changing version format 0.0.0.0 to string V1.2.3.sp0

$
0
0

Product version have general syntax as xx.xx.xx.xx and xx is integer.

Whenever we see the installer with version from Control panel, same above is seen.

Is it anyway to have customized version format to installer?

like, V1.2.444.sp01 and so on.

Viewing all 2763 articles
Browse latest View live


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