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

Error_MSB4018_The "ResolvePackageAssets" task failed unexpectedly.

$
0
0
SeverityCodeDescriptionProjectFileLineSuppression State
ErrorMSB4018 The "ResolvePackageAssets" task failed unexpectedly.
NuGet.Packaging.Core.PackagingException: Unable to find fallback package folder 'C:\Microsoft\Xamarin\NuGet\'.
   at NuGet.Packaging.FallbackPackagePathResolver..ctor(String userPackageFolder, IEnumerable`1 fallbackPackageFolders)
   at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(IEnumerable`1 packageFolders)
   at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(LockFile lockFile)
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter..ctor(ResolvePackageAssets task)
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromDisk(ResolvePackageAssets task, Byte[] settingsHash)
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssets task)
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups()
   at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore()
   at Microsoft.NET.Build.Tasks.TaskBase.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()ConsoleApp1C:\Program Files\dotnet\sdk\3.1.201\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets234

Visual Studio 2015 Intellisense error prompting

$
0
0

Hello,

#import "c:\\Program Files (x86)\\Common Files\\System\\ado\\msado15.dll" no_namespace \
	rename("EOF","adoEOF") rename("DataTypeEnum","adoDataTypeEnum") \
	rename("FieldAttributeEnum", "adoFielAttributeEnum") rename("EditModeEnum", "adoEditModeEnum") \
	rename("LockTypeEnum", "adoLockTypeEnum") rename("RecordStatusEnum", "adoRecordStatusEnum") \
	rename("ParameterDirectionEnum", "adoParameterDirectionEnum")

I am handling a project using ADO. The "#import" always prompts an error:cannot open source file "...project_name\Release\msado15.tlh" before first build. But it's weird that the build can finally success and the error disappears.

In my understanding, this "#import" will automatically generate msado15.tlh in \Release folder after one build process. But prevoiously, I never got this error message.

Any one can explain this for me or suggest how to handle it? Thanks a lot!

ps: Working on vs 2015


I Cant Install IsqliteDb library from NUget in some Projects

$
0
0

Dear Sir

I Cant Install IsqliteDb library from NUget in some Projects and in others it is downloaded 

may some helps plz 

Mqrt.dll is either not designed to run on Windows or it contains an error

$
0
0

I built an application to run on a windows 10 64 bit machine but built it as an x86 app. I have also built it has a x64 app. 

The problem is no matter what Mqrt.dll I use, and I have a variety from different machines including the one I am building on, I keep getting the "mqrt.dll is either not designed to run on Windows or it contains an error. Try installing the program... bla bla bal" error.

I have made sure the .lib and .dll are of the same version and still it crashes on run debug or deployment. The one thing is I have yet to find a 'mqrt.dll' for the x64 build, but I don't think that is the main problem I'm having.

I'm developing with VS2019 and as I said on a 64bit windows 10 machine utilizing c++.

Anyone have any suggestions or seen this before?

Thanks


Trying to build .vcxproj using MSBuild without Visual studio

$
0
0

Is there any opportunity to build without visual studio?
I tried changing the location of property files from visual studio path to user defined path.

Build started, but its failed with checking old version present in C:\users\.nuget\packages\"Project specific version".

Do we have any other alternate to achieve build without visual studio?

I need help with this error

$
0
0

What should I do if it say:

Error 1 Error en la tarea porque "resgen.exe" no se encuentra o no está instalada la versión correcta de Microsoft Windows SDK. La tarea busca "resgen.exe" en el subdirectorio "bin" de la ubicación especificada en el valor InstallationFolder de la clave del Registro HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx35Tools-x86. Puede que el problema se solucione de una de estas formas:  1) Instale Microsoft Windows SDK. 2) Instale Visual Studio 2010. 3) Establezca manualmente la clave del Registro indicada en la ubicación correcta. 4) Pase la ubicación correcta en el parámetro "ToolPath" de la tarea. WindowsApplication1

Project Compilation time increased by more than 10X when Code Analysis is enabled

$
0
0

i'M using VS 2019 Enterprise Edition. i've a .net Core project with around 50 projects. In normal scenario (When Code Analysis is not enabled) the solution compiles in around 3 minutes. However, when i enable the Code Analysis, the compilation time goes around 50-60 minutes.

The same issue is also reproduced in our Azure DevOps build pipeline.

need some help to figure out the root cause.

Thanks,

Himal

64-bit: hung executable, 32-bit many remaining problems!

$
0
0

Dear friends,

I continue compiling my help file in 32 bit but the same problems are recurring: depending on indeed/not automatically included content/index files I have 1457, 1754 or 1970 local links when compiling. But this number should only be depending- inmy case - on the exact number of <A HREF="...">...</a> local links in my text. I preferred the checkbox clicked for both the content and index files and I also included this mysterious line "<H!><! dummy necessary ... with automatically createdcontents file.->". But now my chm file is showing a contents file consisting of question marks! I created in this way countless correct help files but also sometimes these question marks infested help files. Inever checked my help files for the correct number of links and I wouldn't know of any sensible way of doing this! But my educational target will deny me to miss a single one of course! This has been happening before but I grew sotired! I wonder both if somebody else might have experienced the same and solved it also! Many thanks in advance from Ton Epskamp! 

My dear friends,

Possibly like in the decades before I tried the same by clearing the "Automatically create contents file" box and all question marks disappeared again: problem solved! If I ONLY UNDERSTOOD!

Ton Epskamp.





error MSB4062: The "ValidateNTTargetV ersion" task could not be loaded from the assembly

$
0
0
I upgraded to VS2019 16.6.0 with WDK 10.0.18346.1000. When I run msbuild on my project, I see error MSB4062 reported.

I tried running msbuild on the NdisLwf sample driver for Windows 10 and the same error is reported.

I did not see this error on VS2015 or with earlier versions of the Windows 10 SDK. What could be causing this?

how to launch an executable from inside VS

$
0
0

We have a startup script (an .exe) for our application and it would be nice to call it from inside VS after a new compile.

Any suggestions on how to do this?

thanks

VS Studio 2019 error when trying to publish self-contained

$
0
0

I wrote a c# console application that I want to compile for a linux machine. When I use the following command in the console, I get this error:

C:\Program Files\dotnet\sdk\3.1.300\Microsoft.Common.CurrentVersion.targets(3983,5): error MSB4062: The "Microsoft.Build.Tasks.ResolveManifestFiles" task could not be loaded from the assembly Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Confirm that the 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. [X:\Coding\Visual Studio 2019\Projects\firstDiscordBot\firstDiscordBot\firstDiscordBot.csproj]

I read through a lot of similar questions but none of the solutions worked for me. I tried deleting the .vs folder inside my solution's project folder and did Clean and Build and I tried entering

'Install-Package MSBuildTasks' 

into the NuGet Package Manager Console and then rebuilding my project.


Could not resolve this reference. Could not locate the assembly "System.Security".

$
0
0

Could not resolve this reference. Could not locate the assembly "System.Security". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

I am getting this warning.

How can i resolve this ?

Azure static web apps throwing 404 on refresh.

$
0
0

Hi,

I deployed my ReactJS app to Azure static web apps. It works really well apart from when I refresh any page - it throws a 404.

I already have a full login, authorisation and authentication process built in my TypeGraphQL (hosted via an Azure App Service) so I do not want to use the method built into azure static web apps as it is too limiting. I setup the routes.json as per the documentation and put it into the root of the build folder as suggested. Below is my routes.json file. If a user logs in to my site it all works perfect, all routes work perfect but if the site is refreshed I get the Microsoft 404 error. I then need my users to go back to the website url and log back in again. This is very annoying and not a good user experience for my customers.

Is this something you can help with.

Thanks, Séamus.

{
"routes": [
{
"route": "/*",
"serve": "/index.html",
"statusCode": 200
}
],
"platformErrorOverrides": [
{
"errorType": "NotFound",
"serve": "/404"
}
]
}

UWP Release compilation error:ILT0005: 'C:\Program Files (x86)\MSBuild\Microsoft.NetNative\ARM\ilc\tools\Gatekeeper.exe

$
0
0
Hi, I've a UWP project for windows 10 mobile which was working just fine and deployed to windows store several times without issues. But suddenly it stopped compiling in release mode only with this error. Need your help please. I spent two days messing up my VS environment but nothing worked. Whats wrong?
Target Version: Windows 10(10.0; Build 10586
Min Version: Windows 10(10.0; Build 10240)
Compiles and works fine in Debug.

ILT0005: 'C:\Program Files (x86)\MSBuild\Microsoft.NetNative\ARM\ilc\tools\Gatekeeper.exe @"D:\Think Projects\ThinkUniversal\ThinkUniversal\obj\ARM\Release\ilc\intermediate\gkargs.rsp"' returned exit code -532462766
Unhandled Exception: OutOfMemoryException.

MSBuild SignFile task returning MSB3481: The signing certificate could not be located

$
0
0

I have a Windows 10 System with VS 2019 installed. I am using a .Net Standard 2.0 project. I have installed a certificate (pfx) and I can see it using certmgr.msc. I have a custom target with a SignFile task, with the following markup.

<Target Name="SignFile" AfterTargets="Build">    <ItemGroup><FileToSign Include="Source.ps1" />      </ItemGroup><Message Importance="High" Text="Signing Source.ps1  with Certificate Thumbprint..." /><SignFile CertificateThumbprint="MyCertTP" SigningTarget="@(FileToSign)" TargetFrameworkVersion="v4.5" /></Target>

But I am getting an error on build "the signing certificate could not be located. ensure that it is in the current user personal store". I followed the link https://docs.microsoft.com/en-us/visualstudio/msbuild/signfile-task?view=vs-2019

I also checked https://stackoverflow.com/questions/14409465/msbuild-signfile-task-returning-msb3481-the-signing-certificate-could-not-be-lo

But nothing worked. Can anyone please help?

Note: MyCertTP carries the correct thumbprint which cannot be exposed. 


Ven



MSBuild SignFile task returning MSB3482: An error occurred while signing. Data at the root level is invalid.

$
0
0

I have a Windows 10 System with VS 2019 installed. I am using a .Net Standard 2.0 project. I have installed a certificate (pfx) and I can see it using certmgr.msc. I have a custom target with a SignFile task, with the following markup.

<Target Name="SignFile" AfterTargets="Build">    <ItemGroup><FileToSign Include="Source.ps1" />      </ItemGroup><Message Importance="High" Text="Signing Source.ps1  with Certificate Thumbprint..." /><SignFile CertificateThumbprint="MyCertTP" SigningTarget="@(FileToSign)" TargetFrameworkVersion="v4.5" /></Target>

But I am getting an error on build "An error occurred while signing. Data at the root level is invalid. Line 1 Position 1.". I followed the link https://docs.microsoft.com/en-us/visualstudio/msbuild/signfile-task?view=vs-2019

The error is occuring at the SignFile line.

Note: MyCertTP carries the correct thumbprint which cannot be exposed. 


Ven




Want to add some lines to the targets csproj file after installing a nuget

$
0
0
I created a library which will be turned into a nuget that will run on the target assemblies. Let's call it NugLib.

Goal:

What I want is to add2,3 lines to the target assembly after it installed the NugLib. NugLib (the library) had a .targets file which copied some files into the target assembly.

 I want to be able to add some lines to the project (the .csproj file) Not sure if it can be done via the .targets .props .nuspec or the lib's csproj during/after the installing nuget automatically.

Want to add these 3 lines to the target assembly (the nuget consumer):

<Content Include=".pack\*.*;.pack\**;.pack\**\*" /> 

<Import Project="build\build.targets" /> 

<Import Project=".pack\package.csproj" Condition="Exists('.pack\package.csproj')" />






SignTool Issue from MSBuild in Jenkins

$
0
0

I have a Windows 10 VM with VS 2019 installed. I have a .Net Standard 2.0 project. In that I have added a SignTool.exe (version:10.0.19041) from Windows SDK 10 to the project. A valid certificate is installed for both Trusted Root Certification Root Authorities and Personal stores. I have 2 properties defined in the csproj file as below.

<CertThumbprint>Thumbprint_String</CertThumbprint>    <TimestampUrl>TimeStampURL_Link</TimestampUrl>

I also have a target to sign a ps1 file as below, which gets called after build.

<Target Name="SignPS1" AfterTargets="Build"><Message Importance="High" Text="Signing ps1" /><Exec Command="&quot;$(ProjectDir)\SignTool\signtool.exe&quot; sign /debug /fd sha256 /sha1 $(CertThumbprint) /t &quot;$(TimestampUrl)&quot; &quot;$(OutputPath)\MyFile.ps1&quot;" StandardOutputImportance="high" /></Target>

This works fine from Visual Studio solution build and also from MSBuild command from Visual Studio command line.

I have a Jenkins job which runs on a Windows server where we have the same certificate installed for both Trusted Root Certification Root Authorities and Personal stores.

If I run the below MSBuild command from Jenkins, I get an error. (Here I haven't specified the Thumbprint and TimestampUrl since they are provided in csproj file. So I assume the values defined in the file will be assigned by default)

msbuild MySolution.sln -verbosity:m  -t:clean,build /p:Configuration=Release /p:WarningLevel=0 /p:DebugSymbols=false /p:DebugType= 

Error is: EXEC : SignTool error : No certificates were found that met all the given criteria.

If I run the below MSBuild command from Jenkins, I get an error.

msbuild MySolution.sln -verbosity:m  -t:clean,build /p:Configuration=Release /p:WarningLevel=0 /p:DebugSymbols=false /p:DebugType= /p:CertThumbprint=Thumbprint_String /p:TimestampUrl=Timestamp_Url

SignTool error : Invalid SHA1 hash format: ?Thumbprint_String

I am pretty sure there is no "?" in the Certificate Thumbprint. I put it into a notepad and pasted it from there. 

Can anyone please help?


Ven


ClickOnce with new project format

$
0
0

Hi

Is it possible to create a ClickOnce deployment on a webserver with msbuild, if I use the new project format?

Thanks for help!

How do I remove the node from my VS 2017 build profile PROD.pubxml

$
0
0
I created a new publish "Web Deploy" and I opened my PROD pubxml and there is a node called "PublishDatabaseSettings...PublishDatabaseSettings" The information inside of these nodes is pointing to my development database, and after I performed my build successfully to my production environment, my connectionStrings are pointing to the correct production databases that I set up in the transforms in the web.config, but the information inside these nodes are very confusing and I would like to remove the contents between these two nodes. I can't find any information on this.
Viewing all 2763 articles
Browse latest View live


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