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

msixbundle vs. appxbundle

$
0
0

Hi,

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

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

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

Thanks,.


MSBuild 16/2019 version offline installer

$
0
0

Hi Team,

We need to install MSBbuild 16 version in our server, but it doesn't have internet enabled.

I have tried to install it using offline installer which is provided in official website, but it still asking for internet.

Please support on this, how it could be resolved?.

Thanks,

How do I suppress CopyWebApplications on prem TFS 2018 build agents?

$
0
0

We have on premises TFS 2018 and after a updating the build server, we now have a complex build that has quadrupled in size because the default to Disable_CopyWebApplication is no longer true for all the agents. My guess is somebody at this company before me overrode the default at the server level. This complex build is using multiple Powershell and Cake scripts and trying to suppress each one is not working. 

Can anyone tell me how to reset the build agent(s) default for MSBuild to Disable_CopyWebApplication=True?

The task factory "CodeTaskFactory" could not be loaded from the assembly, A required privilege is not held by the client

$
0
0

I got error.

SeverityCodeDescriptionProjectFileLineSuppression State

Error

The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Build.Tasks.Core.dll". A required privilege is not held by the clientSkyOnTheWay.Toolkit.Test

=> This occurred all of sudden. I was compiling OK. After changing some code and tried to build again, all of sudden it fails with above error. Cannot go further. 

I updated all nudget packages, updated visual studio 2019's updates available, restarted computer several times.
Nothing works. Those answers out there internet are similar but all are little different and nothing worked.

I use VS 2019 and was building Universal Windows' app.

 

MCSD .NET, SCJP, SCJWD

How to create a solution for Azure Data Factory

$
0
0

Hello,

I am planning to create a solution in visual studio for Azure Data Factory but when i try to create a solution i do not see a template for azure data factory.

Please suggest me the steps to create a solution for azure data factory.

Thanks

Just updated VS2019 to v16.2.0 and now getting Build Errors MSB4064 & MSB4063

$
0
0

I just updated VS 2019 and now my application Ive been working on won't build.

I am getting the following two errors..

SeverityCodeDescriptionProjectFileLineSuppression State
ErrorMSB4064 The "Nullable" parameter is not supported by the "Csc" task. Verify the parameter exists on the task, and it is a settable public instance property.

 

ErrorMSB4063 The "Csc" task could not be initialized with its input parameters. RoslynDDDCodeGeneratorC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets59

Microsoft Visual Studio Community 2019
Version 16.2.0
VisualStudio.16.Release/16.2.0+29123.88
Microsoft .NET Framework
Version 4.8.03752

Installed Version: Community

ADL Tools Service Provider   1.0
This package contains services used by Data Lake tools

Application Insights Tools for Visual Studio Package   9.1.00611.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2019   16.2.290.48383
ASP.NET and Web Tools 2019

ASP.NET Web Frameworks and Tools 2019   16.2.290.48383
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   16.2.290.48383
Azure App Service Tools v3.0.0

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.3.9000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools   16.2.290.48383
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio   2.3.9000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools   3.2.0-beta4-19359-03+15b43b33901c88f68ef43f8314b5a2457716780d
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Fabric.DiagnosticEvents   1.0
Fabric Diagnostic Events

IntelliCode Extension   1.0
IntelliCode Visual Studio Extension Detailed Info

Microsoft Azure HDInsight Azure Node   2.3.9000.0
HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service   2.3.9000.0
Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio   2.5
Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service   2.3.9000.0
Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node   1.0
Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 0x10 - v2.9.20626.2

Microsoft Continuous Delivery Tools for Visual Studio   0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager   1.0
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Node.js Tools   1.5.10610.1 Commit Hash:529a87de2769e143655e31ea81795c42e5775ef8
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   5.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

SQL Server Data Tools   16.0.61906.28070
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript Tools   16.0.10627.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   3.2.0-beta4-19359-03+15b43b33901c88f68ef43f8314b5a2457716780d
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.4 for F# 4.6   16.2.0-beta.19321.1+a24d94ecf97d0d69d4fbe6b8b10cd1f97737fff4
Microsoft Visual F# Tools 10.4 for F# 4.6

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Containers   1.0
Visual Studio Tools for Containers

Visual Studio Tools for Kubernetes   1.0
Visual Studio Tools for Kubernetes

Need to pass enviroment variables to a .bat file executed from a VS2017 project.

$
0
0

Howdy, I've spent a day trying to pass variables I've defined in my .vcxproj and/or the inherited Directory.Build.targets like this:

<PropertyGroup>            
<SOME_VAR>C:\some_dir\</SOME_VAR>     
</PropertyGroup>

Now, my project consists of a single file; export.bat - which needs that variable defined. If you were to define that variable in cmd & then run the file, all would be good; but I can't figure out how to set the environment of whatever is launching this export.bat.

I also do not have the full project properties interface for whatever reason.
Under Configuration Properties the only options I have are:
General
Debugging
VC++ Directories
NMake

Any insight would be appreciated!

P.S.
This method used to work in VS2008 by specifying the variable in the .slnenv
Now I have a dozen+ projects that are in this broken situation.

LNK4209: Do Visual Studio 2017/19 Support Codeview 8?

$
0
0
I am trying to build and debug an open source app. This app uses NASM to compile a number of assembly files, which are then linked into the main app. This works properly when NASM does not generate debug information, but when instructed to do so the linker gives "warning LNK4209: debugging information corrupt; recompile module; linking object as if no debug info". NASM generates Codeview 8 debugging information in the obj files, according to its documentation. I've tried this on both VS 2017 and 2019, each targeting their respective toolsets, with the same result. I am unclear whether the problem is with Visual Studio's linker or with NASM at this point.

How to not just "Go To Line", but also specify character number in said line

$
0
0

Hello everyone,

I am aware of the 'Go To Line' keyboard shortcut, which is okay. Though, what would be even better, is to have the ability to also specify where in the line you want to go to. Say you want to jump to line 150, but really are only interested in a word near the middle of the line. You'd have to spam tab+right to get to the line, while concentrating not to go past the spot.

If there's a way to specify the character number apart from the line number? Does a way already exist? Please help out.

Thank you for reading.

Gurt.

<style id="EasyRead">html * { letter-spacing: 0.0836458341698em !important; word-spacing: 0.10873958442074em !important;}</style>

MSBuild DependsOnTargets in nested proj invoked but should not?

$
0
0

Hi, 
I'm having a problematic behaviour with msbuild that some projects/targets are 
skipped (maybe correct) but DependsOnTargets are run but should also be skipped?
This difference leads to unbuilt dependencies etc.

In the example below 'someCsProj.csproj' is built fine in 'projA.proj', then that msbuild file invokes 
projB.proj using the msbuild task which invokes the 'PreBuild' target but skips 'someCsProj.csproj/Build' since 
it's already built but this leads to missing dependencies (disk is cleaned in prebuild).

Specific question: Why is the DependsOnTargets in projB run but not the MSBuild task 'someCsProj.csproj' ?
 I cannot see how they get different properties etc. We get into an invalid state when PreBuild is run but not the MSBuild task later. 
 Shouldn't the same 'Target skipped. Previously built successfully' rules apply to both targets?

build is invoked with 'msbuild.exe projA.proj /t:Build'
Example files, 

'projA.proj':
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="common.proj" />
  <Target Name="Build" DependsOnTargets="PreBuild">
    <Message Text="Build in projA" />
    <MSBuild Projects="someCsProj.csproj" Targets="Build" />
    <MSBuild Projects="projB.proj" Targets="Build" />
  </Target>
</Project>

'projB.proj':
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="common.proj" />
  <Target Name="Build" DependsOnTargets="PreBuild">            <!-- prebuild is run -->
    <Message Text="Build in projB, first" />
    <MSBuild Projects="someCsProj.csproj" Targets="Build" />   <!-- this is not run -->
    <Message Text="Build in projB, second" />
  </Target>
</Project>

'common.proj':
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Target Name="PreBuild">
    <Message Text="*** cleaning and init etc" />
  </Target>
</Project>

Unable to create a manifest resource name for "My Project\TeacherForm.resx" ...

$
0
0

Hi there,

I'm working on some code for my coursework at school. I copied the folder which contained all the code that was needed for my project onto my online drive from school. I then downloaded it back at home. However when i try to run the project, I keep getting this error coming up. 

Unable to create a manifest resource name for "My Project\TeacherForm.resx". Could not find file 'C:\Users\"my name"\Desktop\Computer Science Quiz\Computer Science Quiz\My Project\TeacherForm.vb'.

Help would be appreciated :)

Thanks!

Unable to compile projects using Windows Workflow: Microsoft.Build.Tasks.Dll

$
0
0

 

I had this issue back with Beta2:

 

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1949553&SiteID=1

 

After upgrading to VS 2008 RTM from VS 2008 Beta 2 (on Vista Business x64), I now am unable to build 3 of my projects.  All 3 of these projects use Windows Workflow.

 

Here are the errors:

 

Error 4 The "Microsoft.Build.Tasks.Delete" task could not be loaded from the assembly C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Build.Tasks.dll. Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Build.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available. Platform.StagingAnalysis.Workflow

 

Error 5 The "Microsoft.Build.Tasks.Delete" task could not be loaded from the assembly C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Build.Tasks.dll. Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Build.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available. Platform.StagingAnalysis.Workflow.Services

Error 6 The "Microsoft.Build.Tasks.Delete" task could not be loaded from the assembly C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Build.Tasks.dll. Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Build.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available. Platform.StagingAnalysis.Workflow.ConsoleHost

I've checked the two files mentioned in the above forum post and ensured I've removed those lines, no help.

 

Any ideas?

 

thx

 

- Alex

VSTO Debug question?

$
0
0

Hi, i want to ask this folder what to do? It seems to be generated when I debug. It takes up a lot of space. whether there is a way to ignore it or whether it is really needed

Thansk so much!

<coccocgrammar></coccocgrammar>

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


Trying to run unit tests using selenium and nunit i have encountered this problem can anyone help?

$
0
0

Error

The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly.
System.Exception: Unit test Provider already set.
   at TechTalk.SpecFlow.UnitTestProvider.UnitTestProviderConfiguration.UseUnitTestProvider(String unitTestProviderName)
   at TechTalk.SpecFlow.NUnit.Generator.SpecFlowPlugin.GeneratorPlugin.Initialize(GeneratorPluginEvents generatorPluginEvents, GeneratorPluginParameters generatorPluginParameters, UnitTestProviderConfiguration unitTestProviderConfiguration) in D:\a\1\s\Plugins\TechTalk.SpecFlow.NUnit.Generator.SpecFlowPlugin\GeneratorPlugin.cs:line 14
   at TechTalk.SpecFlow.Generator.GeneratorContainerBuilder.LoadPlugins(ObjectContainer container, GeneratorPluginEvents generatorPluginEvents, UnitTestProviderConfiguration unitTestProviderConfiguration, IEnumerable`1 generatorPlugins)
   at TechTalk.SpecFlow.Generator.GeneratorContainerBuilder.CreateContainer(SpecFlowConfigurationHolder configurationHolder, ProjectSettings projectSettings, IEnumerable`1 generatorPluginInfos, IObjectContainer parentObjectContainer)
   at SpecFlow.Tools.MsBuild.Generation.WrappedGeneratorContainerBuilder.BuildGeneratorContainer(SpecFlowConfigurationHolder specFlowConfigurationHolder, ProjectSettings projectSettings, IReadOnlyCollection`1 generatorPluginInfos, IObjectContainer rootObjectContainer)
   at SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTaskExecutor.Execute()
   at SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTask.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()AutomationTesting


Web Deploy publish/package validating error: Missing or Invalid property value for $(MsDeployServiceUrl)

$
0
0

Hi,

I am trying to do FS publishing for my .CSPROJ project and issue the following command:

call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"  DemoWeb.csproj /m /v:m /t:Clean,Build,Publish /T:"DemoWeb:Rebuild"  /p:WebPublishMethod=FileSystem /p:DeployTarget=MsDeployPublish  /p:Configuration=Debug /p:DeployOnBuild=true /p:PublishProfile='FolderProfile1'

but instead of a working web app I get the following errors:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\Web\Microsoft.Web.Publishing.targets(4070,5): error : Web Deploy publish/package validating error: Missing or Invalid property value for $(MsDeployServiceUrl) [C:\prj\DemoWeb.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\v16.0\Web\Microsoft.Web.Publishing.targets(4077,5): error : Target GenerateGlobalPublishSetting Failed [C:\prj\DemoWeb.csproj]

The folder prj contains DemoWeb\Properties\PublishProfiles\FolderProfile1.pubxml

 with the following content:

<?xml version="1.0" encoding="utf-8"?><!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121. 
--><Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><WebPublishMethod>FileSystem</WebPublishMethod><PublishProvider>FileSystem</PublishProvider><LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration><LastUsedPlatform>Any CPU</LastUsedPlatform><SiteUrlToLaunchAfterPublish /><LaunchSiteAfterPublish>True</LaunchSiteAfterPublish><ExcludeApp_Data>False</ExcludeApp_Data><publishUrl>C:\build</publishUrl><DeleteExistingFiles>True</DeleteExistingFiles><PrecompileBeforePublish>True</PrecompileBeforePublish><EnableUpdateable>True</EnableUpdateable><DebugSymbols>False</DebugSymbols><WDPMergeOption>DonotMerge</WDPMergeOption></PropertyGroup></Project>

At the same time  in VS2019 Community publishing for the same profile runs with flying colors. What should I do to publish my project from cmd line?

Need to call a different post build event for build, rebuild & clean in VS17

$
0
0

Howdy! I need to call a different command for build, rebuild & clean in a VS 2017 project.

I was dreaming up something like this code, but I can't find any environment variables that correspond with rebuilding, cleaning & building.

<ItemDefinitionGroup><PostBuildEvent> <!-- want this to be called on build -->  <Command>CALL .\export.bat BUILD $(SOME_ENV_VAR)</Command></PostBuildEvent><PostBuildEvent> <!-- want this to be called on rebuild -->   <Command>CALL .\export.bat REBUILD $(SOME_ENV_VAR)</Command></PostBuildEvent><PostBuildEvent> <!-- want this to be called on clean -->  <Command>CALL .\export.bat CLEAN $(SOME_ENV_VAR)</Command></PostBuildEvent></ItemDefinitionGroup>
I'd be happy with a solution that does the same thing.

How to change network location type from unidentified to private using c++ on windows 10

$
0
0

Hi

I have tried to connect my raspberry pi with windows 10.
After connecting it, the unidentified network is created on my windows 10 and it is a public network.
I'd like to change it to private.
If I change location type to private on the Local Security Policy, the problem will be solved.
But I'd like to do it using c++.
If you have any solutions, please guide me.
Looking forward to hearing from you.

Thanks

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

Dev Ops Build not Compiling the code

$
0
0
With XAML builds, I was able to pass in the following MSBuild Argument /p:GenerateProjectSpecificOutputFolder=True and it would compile my code with the appropriate dll files.  In the new Azure DevOps build, all of the projects in my solution are being ported as uncompiled code (*.vb files).  Can someone tell me what the new MSBuild Argument is to invoke the code to be compiled. I would love in a future version for there to be an option that simply states, "Compile All Projects (Y/N). Many thanks!
Viewing all 2763 articles
Browse latest View live


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