question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Visual Studio 2015 throws build error when configuration contains space

See original GitHub issue

Steps to reproduce

  • Create a new .NET Core ConsoleApplication (or asp.net 5 app doesn’t matter)
  • Create a new build configuration with a space character i.e. “Debug Test”
  • Compile the project using visual studio 2015

Expected behavior

  • build succeeds

Actual behavior

  • build fails

The output window logs the following line: C:\Program Files\dotnet\dotnet.exe build "[pathToProject]" --configuration Debug Test --no-dependencies

And the error message: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(241,5): error : Couldn't find 'project.json' in 'Test'

The error is that is executes dotnet.exe using --configuration Debug Test and not --configuration "Debug Test"

if i execute the command manually with quotation marks then it workes. I know this is more an issue of visual studio 2015 that corecli but I just don’t know the right place for that.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview1-002702)

Product Information:
 Version:     1.0.0-preview1-002702
 Commit Sha:  6cde21225e

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

Visual Studio data

Microsoft Visual Studio Community 2015
Version 14.0.25123.00 Update 2
Microsoft .NET Framework
Version 4.6.01038

Installed products:

Installed Version: Community

Visual Basic 2015   00322-20000-00000-AA943
Microsoft Visual Basic 2015

Visual C# 2015   00322-20000-00000-AA943
Microsoft Visual C# 2015

Visual C++ 2015   00322-20000-00000-AA943
Microsoft Visual C++ 2015

Application Insights Tools for Visual Studio Package   5.209.60613.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1   14.1.20512.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.9   14.0.20316.0
Azure App Service Tools v2.9

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.0.6000.0
Microsoft Azure Data Lake Tools for Visual Studio

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

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JetBrains ReSharper Ultimate 2016.1.2    Build 105.0.20160522.80219
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2016 JetBrains, Inc.

Microsoft .NET Core Tools (Preview 1)   14.1.20512.0
Microsoft .NET Core Tools (Preview 1)

Microsoft Azure HDInsight HQL Service   2.0.6000.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   2.0.6000.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.40323.3

MySQL for Visual Studio   1.2.6
Data design and management tools for MySQL.  Copyright © 2007-2015 Oracle, Inc.

Node.js Tools   1.1.31117.00
Adds support for developing and debugging Node.js apps in Visual Studio

Node.js Tools - Profiling   1.1.31117.00
Profiling support for Node.js projects.

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

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Python Tools for Visual Studio   2.2.40315.00
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.

Python Tools for Visual Studio - Django Integration   2.2.40315.00
Provides templates and integration for the Django web framework.

Python Tools for Visual Studio - Profiling Support   2.2.40315.00
Profiling support for Python projects.

SQL Server Data Tools   14.0.60311.1
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   1.8.31.0
TypeScript tools for Visual Studio

Web Essentials 2015.2   2.0.214
Adds many useful features to Visual Studio for web developers. Requires Visual Studio 2015


Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
whymattercommented, Jul 27, 2016

@blackdwarf I mean it’s possible to create a configuration named Debug Test in Visual Studio. But it’s not possible to build a project using this configuration. I believe this is very bad…

If an user is able to create the configuration Debug Test, then he should be able to build with this configuration. But what he get’s is just a strange error message…

0reactions
blackdwarfcommented, Jul 27, 2016

@whymatter I’m not sure I follow your last comment. Could you provide more details?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Current solution contains incorrect configuration mappings
In my case, it was because the .csproj file had the wrong profiles compared to the global profiles. Ensure that the tag has...
Read more >
Fix program errors and improve code - Visual Studio ...
This article describes some basic ways Visual Studio can help you find and fix problems in your code, including build errors, code analysis, ......
Read more >
Build fails with spaces in user directory · Issue #438
What you're doing and what's happening: Trying to build using VS 2017 Enterprise, the build fails like this: 24>C:\Program Files (x86)\Microsoft ...
Read more >
Windows Explorer crashes when opening folder with a ...
After installing VS17 Update 1, I can no longer open any folder with a Typescript file in it in Windows Explorer (Windows 10)....
Read more >
MSBuild jobs failing with C# Compilation errors | Bamboo
When running a build using MSBuild from Visual Studio 2017, the build fails with the following Compilation errors in the Build Log:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found