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

Error MSB4057

$
0
0
Severity Code Description Project File Line Suppression State
Error MSB4057 The target "ResolveTagHelperRazorGenerateInputs" does not exist in the project. SunWeb.Web C:\Program Files\dotnet\sdk\2.1.602\Sdks\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets 227 

Getting csproj files info from a solution file

$
0
0

Is there any way we can get the csproj files being referred in a solution file? My build script only refers to solution file but I also need csproj files information.

An error occurred while signing: SignTool.exe not found.

$
0
0

I recently upgraded from Visual Studio 2013 Community to the 2015 edition of Community. However, when I attempted to open one of my older projects that i created in VS 2013 Community, the error, "An error occurred while signing: SignTool.exe not found.", prevented my ability to run the project.

I faced this issue with a C# console application as well, but when i created a new project and copied the code from the original project, it worked as expected.  However, this project that I am now facing the issue with is a VB project, that has multiple forms and a substantial amount of controls, so I am unable to just copy and paste code on this occasion.

It is very important that I am able to work on this project, so any help/suggestion is welcome.

Thank you

Ian H

Transforming T4 template on build intermittently produces an exception

$
0
0

Hi all,

I'm using 

<PropertyGroup><TransformOnBuild>True</TransformOnBuild> <OverwriteReadOnlyOutputFiles>true</OverwriteReadOnlyOutputFiles><TransformOutOfDateOnly>false</TransformOutOfDateOnly></PropertyGroup>

to transform all templates in the project upon building. This works most of the time, however, sometimes it throws this:

error : An Exception was thrown while processing a directive named 'Dsl'. The transformation will not be run.  The following Exception was thrown: [C:\Source\Trunk\Projects\Driver.Design.Package\Driver.Design.Package.csproj]
error : System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Modeling.Sdk.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. [C:\Source\Trunk\Projects\Driver.Design.Package\Driver.Design.Package.csproj]
error : File name: 'Microsoft.VisualStudio.Modeling.Sdk.15.0, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' [C:\Source\Trunk\Projects\Driver.Design.Package\Driver.Design.Package.csproj]
error :    at Microsoft.VisualStudio.Modeling.DslDefinition.DslDirectiveProcessorBase.GeneratePostInitializationCode(String directiveName, StringBuilder codeBuffer, CodeDomProvider languageProvider, IDictionary`2 requiresArguments, IDictionary`2 providesArguments) [C:\Source\Trunk\Projects\Driver.Design.Package\Driver.Design.Package.csproj]
error :    at Microsoft.VisualStudio.Modeling.DslDefinition.DslDirectiveProcessor.GeneratePostInitializationCode(String directiveName, StringBuilder codeBuffer, CodeDomProvider languageProvider, IDictionary`2 requiresArguments, IDictionary`2 providesArguments) [C:\Source\Trunk\Projects\Driver.Design.Package\Driver.Design.Package.csproj]
error :    at Microsoft.VisualStudio.TextTemplating.RequiresProvidesDirectiveProcessor.ProcessDirective(String directiveName, IDictionary`2 arguments) [C:\Source\Trunk\Projects\Driver.Design.Package\Driver.Design.Package.csproj]
error :    at Microsoft.VisualStudio.TextTemplating.Engine.ProcessCustomDirectives(ITextTemplatingEngineHost host, TemplateProcessingSession session, ITelemetryScope scope, IEnumerable`1 directivesToBeProcessed) [C:\Source\Trunk\Projects\Driver.Design.Package\Driver.Design.Package.csproj]
error :  [C:\Source\Trunk\Projects\Driver.Design.Package\Driver.Design.Package.csproj]
error : WRN: Assembly binding logging is turned OFF. [C:\Source\Trunk\Projects\Driver.Design.Package\Driver.Design.Package.csproj]
error : To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. [C:\Source\Trunk\Projects\Driver.Design.Package\Driver.Design.Package.csproj]
error : Note: There is some performance penalty associated with assembly bind failure logging. [C:\Source\Trunk\Projects\Driver.Design.Package\Driver.Design.Package.csproj]
error : To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. [C:\Source\Trunk\Projects\Driver.Design.Package\Driver.Design.Package.csproj]
error : . Line=4, Column=4 [C:\Source\Trunk\Projects\Driver.Design.Package\Driver.Design.Package.csproj]

I rebuilt this project 1000 times overnight, and it threw this exception twice. It normally wouldn't be a problem, but this project will be part of a TFS build pipeline, and I wouldn't want this to cause any failures.

Considering it builds 99% of the time, I'm pretty lost on what could be the cause of this.

Error MSB4018 task failed unexpectedly

$
0
0

Severity Code Description Project File Line Suppression State
Error MSB4018 The "GetVarsFromMakefile" task failed unexpectedly.
System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at InlineCode.GetVarsFromMakefile.Execute() in c:\Users\sl\AppData\Local\Temp\j2i1yum1.0.cs:line 71
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() QtGuiApplication1 C:\Users\sl\AppData\Local\QtMsBuild\qt_vars.targets 246 

Im trying to use Qt and when I create qt gui application in VS2019 , and I write nothing and just run it to check the default things this happens.

header:

#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_QtGuiApplication1.h"
class QtGuiApplication1 : public QMainWindow
{
 Q_OBJECT
public:
 QtGuiApplication1(QWidget *parent = Q_NULLPTR);

private:
 Ui::QtGuiApplication1Class ui;
};

main.cpp

#include "QtGuiApplication1.h"
#include <QtWidgets/QApplication>

int main(int argc, char *argv[])
{
 QApplication a(argc, argv);
 QtGuiApplication1 w;
 w.show();
 return a.exec();
}

projectName.cpp

#include "QtGuiApplication1.h"

QtGuiApplication1::QtGuiApplication1(QWidget *parent)
 : QMainWindow(parent)
{
 ui.setupUi(this);
}

please someone help me.

Need example for Pack Target of MSBuild

$
0
0

I have a VS 2019 Solution with some .Net Framework 4.7.2 library projects. I need to create a NuGet Package after building each project in the solution. I came to know about Pack Target in MSBuild. But I didn't get any sample / code to achieve this. I would need help with 3 things.

1. A Sample .Net Framework 4.7.2 Class Library Project (VS2019) with NuGet Pack Target implemented

2. How to pass the various properties like Id, Name, Author, Version, Description etc?

3. Is there a way to customize which files should be included in this package? If yes, how?

Please help.


Ven

My Visual Studio Community 2019 Preview doesn't build anymore!

$
0
0
I am using Visual Studio Community 2019 with amongst others the next problems:
1. My basic include file seemed - sometimes - impossible to find. Renewal of my license sometimes solved this problem unpredictably. Strangely enough this include file was ALWAYS present and ALWAYS identically indicated in all my projects's property pages!
2. Many times an error C1083 appeared and disappeared solved again unpredictably by a renewal of my license sometimes more than once a week!
3. At last an error TRK0005 generated by tracker.exe resulted unsolvably: I had to back step to Visual Studio Community 2017. This again causing a complaint about v142 building tools. I start thinking this might be tracker.exe's (only?) purpose! Possibly tracker.exe might be the cause of all my misery? But how to get rid of it?
ANY HELP WILL BE ACCEPTED WITH THE UTMOST GRATITUDE!
I am Ton Epskamp at a.epskamp@ziggo.nl.

MSBuild Running Slow Called from PowerShell Script (Visual Studio 2019)

$
0
0

Hi there folks,

I set up a new TFS Build Server recently and I'm investigating some extended time periods during the build process.  One of those periods is the recompiling of our Selenium test .dll.  First, the packages are restored via MSBuild, which is fine.  Then, the script hangs for about 10 minutes, while the .dll is actually compiled.

This worked fine on our Visual Studio 2017 Build Server, (took a few seconds to compile I believe) but seems problematic with 2019.

Here's the code.  Am I missing an MSBuild parameter or two?

$msbuild = """C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe"""

# Rebuild the Test source .dll...
Write-Host "********** Running UI Tests **********"

# Restore Selenium packages...
Write-Host "********** Restoring Selenium Packages **********"&"C:\Nuget.exe\Nuget.exe" restore  $source\Development\12.0\Web\MyAppWeb\MyCo.SeleniumUITest\MyCo.SeleniumUITest.sln -DisableParallelProcessing
Write-Host "********** Selenium Packages Restored **********"

# Changes for new MSBuild....
$projfile = "$source\Development\12.0\Web\MyAppWeb\MyCo.SeleniumUITest\MyCo.SeleniumUITest.sln"

try
{
    start-process $msbuild -ArgumentList @($projfile,'/t:Rebuild','/p:configuration=Release') -Wait
    Write-Host "********** Selenium .dll compiled successfully! **********"
}
catch
{
    Write-Host $_.Exception.Message
    exit 1
}

Any Help Appreciated!  If this should go in the PowerShell forum, let me know.  I thought MSBuild would be the correct place as I'm hoping its just a parameter or call tweak.


ClickOnce installation failure: SqlLocalDB2012\x64\sqlcmdInutils.msi has changed since it was initially published

$
0
0

I have a VS2017 project that I am publishing with ClickOnce.  Prerequisites include SQLLocalDB2012.  All previous versions have published successfully, and users have been able to download and install the application.

New users are now, however, receiving an error message that is stopping the download of both SqlLocalDB2012 and the application:

The install log file contains the same error message, but no other information.

These two postings here and here suggest that the problem is related to the public key on the ClickOnce Bootstrapper file, product.xml, not matching the product key of the setup.exe installer.  I accordingly amended product.xml by replacing its product keys for all SqlLocalDB2012 elements to match the setup.exe product key and re-published, but this has not solved the problem.

I have also tried installing SqlLocalDB2012 manually first, but when I then try to download the application, it does not recognise that SqlLocalDB is already installed and still tries to run sqlcmdInutils.msi, leading to the same failure.

I cannot understand why, after two years of successfully publishing a number of versions of this application, I am now getting this error.  I have made no changes to other prerequisites or the manner or destination (my website) of publication and have simply incremented the version number on each occasion. 

Can you help?


Mike Whalley

Validating PublishProfile - msbuild can't find deploy package

$
0
0

I was trying to publish a web api project, in Jenkins, and it failed:

ValidatePublishProfileSettings: Validating PublishProfile(kt_ws.Public_deploypackage) settings. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4371,5): error : The value for PublishProfile is set to 'kt_ws.Public_deploypackage', expected to find the file at 'E:\Dev\Jenkins\workspace\KorTerra-Builds\KT-WS.Public-Trunk-Build\kt_ws.Public\Properties\PublishProfiles\kt_ws.Public_deploypackage' but it could not be found.

I tried to publish using VS2019, and it worked fine.

Then I tried running msbuild on the command line, and it failed with the same error.

>msbuild /t:build /p:Configuration=Release /p:DeployOnBuild=true /p:PublishProfile=kt_ws.Public_deploypackage /p:VisualStudioVersion=14.0 /p:AspnetMergePath="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\\" test_kt_ws.Public.sln

After spending an hour or so messing about, trying convince myself that what was happening was what was happening (and that both on the Jenkins build machine and on my local dev machine the .pubxml file was exactly where msbuild said it wasn't), I took a wild guess.

I renamed the .pubxml file so that it didn't have a period, from "kt_ws.Public_deploypackage" to "kt_ws_Public_deploypackage".

And then everything worked.

Is anyone else seeing this?

web apps exe files

$
0
0
hi. was wondering. is there a tool or a way to then have web apps for visual studio. to then be able to then put on the start menu in windows 10. is there a way to convert web apps to web rpogressive apps. using visual studio 2019 community 32 bit, sql management studio 64 bit 2018. thanks.

http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

All my 64-bits executables will generate an exception whenever trying to use its *.chm file!

$
0
0

Dear friends,

Calling HtmlHelp() in any normal way from a 64-bits application will throw an exception that kills my executable. I even recompiled my *.chm file with exactly this same result. My *.chm file seems to be OK because I will be able to process it and it seems to be behaving normally. I have in the link properties included htmlhelp.lib. I am running Visual Studio Community 2019 under Windows 10. My executables character set is UNICODE. Everything went fine when running the same executables in 32-bits.

I am Ton Epskamp  at a.epskamp@ziggo.nl.

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.

Do I need a license to run Visual Studio 2019 on our build server

$
0
0

We're about to purchase stand-alone professional licenses for my team and I'd like to know whether we need to buy another license for the build server (we're running it on a Win10 machine under a Jenkins CI server if that makes a difference).

Previous advice I've read has suggested as long as we have licenses for the developers using the build server, that we do not require an additional one but I cannot find any documented confirmation that that is the case for Visual studio 2019

SQL Script Error in VS solution

$
0
0

I have a db project solution that does a truncate of the table and has set of insert statements in to the table.

i see build error "Only one statement is allowed per batch. A batch seperator.such as 'GO' might be required between statements."

If i set the build property to "None".the build succeeds but the script is not getting executed when the solution is deployed to an environment.

Can you help in getting rid of the build error when the build property is set to "Build" OR  Can i force execute the script when the build property is set to None

Thanks,

Abhi



Prevent execution of a custom target during Clean

$
0
0

I have a custom target which will have to be called during Build. Its in a .targets file for .wixproj. 

<Target Name="HeatTarget" AfterTargets="EnsureWixToolsetInstalled" >   <Exec Command='"$(WixToolPath)heat.exe" dir MyDir -cg myCG-dr APP_DIR -gg -g1 -sfrag -sw -svb6 -srd -sreg -ke -var var.WXSPath -out "MyWix.wxs"' /></Target>

Unfortunately, this targets is getting called even during Clean. If I add Clean after EnsureWiXToolsetInstalled above, it is not getting called during Build. Can anyone please help?


Ven

disable netcore 3 "Project Performance Summary"

$
0
0

Hi, I've moved some of my projects into netcore 3 with VS2019. Everything seems to work well, but every time I compile something, the output window gets cluttered with "Project Performance Summary".

I've turned MSBuild verbosity to "Quiet" in tools->options->projects and solutions->build and run however I keep getting that superfluous information.

Is this responsability of MSBuild or the culprit is somewhere else? What can I do to avoid getting the Project Performance Summary in build output?

tool to create or import and installer packages

$
0
0
hi. a blind it developer using jaws for windows from http://www.freedomscientific.com, nvda from http://www.nvaccess.org. now is there a msi tool to then create packages and setup exe files from visual studio , web project, windows store, and also windows 8 and windows phone some old projects, i have when i did my certificate iv programming and diploma of software development and also web development i did a few years back. do have the msi x program, but it did not build the packages. so any ideas, and visual studio will not build some of the projects, and deploy, because of errors, or old technology. and also want to build my web apps, but a accessibility problem and the product output box is totally inaccessible, the combo boxes do not speak any of the values, and this is a pain. any one got any ideas, how i can build. these issues. thanks.

http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

CopyLocal=false does not propagate transitively

$
0
0


With SDK style csproj and SDK 3.1.101.

If project A reference project B which reference project C, and B is copylocal=false in A, then I would expect to see only A in the output fo A, but I see C which is not referenced directly by A, only through B. So it looks like the copylocal=false flag, applied to B fine, but did not propagate to the dependencies of B, and they got copied in the output.

The same example with dll reference instead of project reference does not have the issue.

How can I do to make a true copylocal=false?

Thanks.

VS2019 post build event error

$
0
0

I have a project that builds ok in VS2017.  But fails to build in VS2019 (either release or preview versions).  This is the error message:

Severity	Code	Description	Project	File	Line	Suppression State
Error	MSB3073	The command "setlocal
cmake -E copy E:/storage/transmitterdan/OpenCPN/build/Release/opencpn.pdb E:/storage/transmitterdan/OpenCPN/build/Release/opencpn-5.0.522.pdb
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 9009.	opencpn	C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets	149	
The issue seems to be that a multi-line command with embedded line feeds is determined to be in error without even trying to run the text through CMD.  The post build event strings are created by CMake.

Viewing all 2763 articles
Browse latest View live


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