Context

Before Visual Studio 2017 was released, I was implementing my ASP.NET Core project using VS2015. TFS2015 is used for Continuous Build and Deployment for my projects.

After migrating to VS2017, there are couple of issues I encountered in my environment:

  • VS2017 has abounded the JSON project file format.
  • Dotcore tools’ versions in Visual Studio Team Service are different in different agents.

This page summarizes the steps you need to do to resolve these issues.

Hosted VS2017 Agent

Based on the following documentation, you need to use Hosted VS2017 agent for VS2017 projects build since the project file format is now different:

https://www.visualstudio.com/en-au/docs/build/steps/build/msbuild 

Team Services and Team Foundation Server 2017: If your team uses Visual Studio 2017 and you want to use our hosted agents, make sure you select as your default queue the Hosted VS2017. See Hosted agents.image

If you don’t do this, the dotnet core CLI will still look for project.json files, which can lead to errors like the following:

Couldn't find 'project.json' in 'C:\a\1\s\src\****’

dotnet core CLI changes

Previously, you can run dotnet core commands using folder path as argument.

dotnet restore $foldername

However, with VS2017, you can specify the actual project file name:

dotnet restore  src\mywebsite.csproj

Otherwise you may meet the following issue:

warn : The folder 'C:\a\1\s\src' does not contain a project to restore.

Further more, you may encounter many related compiling issues as all the packages referenced are not restored successfully.

Program.cs(10,18): error CS0518: Predefined type 'System.Object' is not defined or imported …


info Last modified by Raymond at 4 years ago copyright This page is subject to Site terms.

More from Kontext

Machine Learning with .NET in Jupyter Notebooks

local_offer plot local_offer machine-learning local_offer jupyter-notebook local_offer C# local_offer dotnet core

visibility 597
thumb_up 0
access_time 8 months ago

In this article, I'm going to show you how to install Jupyter in Windows and then install .NET kernel for Jupyter notebooks. It also shows a machine learning example using ML.NET. The target audience are .NET developers who want to expand their skills in data engineering and science domain...

open_in_new .NET Machine Learning

local_offer .NET local_offer dotnet core local_offer spark local_offer parquet local_offer hive

visibility 1553
thumb_up 0
access_time 2 years ago

I’ve been following Mobius project for a while and have been waiting for this day. .NET for Apache Spark v0.1.0 was just published on 2019-04-25 on GitHub. It provides high performance APIs for programming Apache Spark applications with C# and F#. It is .NET Standard complaint and can run in Wind...

open_in_new Spark

local_offer asp.net core 2 local_offer asp.net core local_offer dotnetcore local_offer open-banking

visibility 247
thumb_up 0
access_time 2 years ago

I’ve just started an asp.net core 2.2 based implementation for Australia Consumer Data Standards (published by Data 61). Opening Banking initiative will follow these standards. The purpose is to help you to get familiar with these standards, especially the APIs that need to be implemented. ...

open_in_new ASP.NET Core

local_offer dotnet core

visibility 3115
thumb_up 0
access_time 3 years ago

.NET Framework, you can use |DataDirectory| to configure connection string when connecting to SQL Server database file via attach mode: AttachDbFilename=|DataDirectory|\dbname.mdf In .NET Core, you cannot directly set SQL Server Express connec...

open_in_new .NET Framework

comment Comments (0)

comment Add comment

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

No comments yet.

Kontext Column

Created for everyone to publish data, programming and cloud related articles. Follow three steps to create your columns.


Learn more arrow_forward