Adding to my vs2015 update 3 installation. To a brand new console project.
Attempting to gather dependency information for package 'Npgsql.3.2.4'
with respect to project 'ConsoleApplication4', targeting
'.NETFramework,Version=v4.5.2' Attempting to resolve dependencies for
package 'Npgsql.3.2.4' with DependencyBehavior 'Lowest' Resolving
actions to install package 'Npgsql.3.2.4' Resolved actions to install
package 'Npgsql.3.2.4' Adding package
'System.Threading.Tasks.Extensions.4.3.0' to folder
'c:\users\paul.pmdev\documents\visual studio
2015\Projects\ConsoleApplication4\packages' Added package
'System.Threading.Tasks.Extensions.4.3.0' to folder
'c:\users\paul.pmdev\documents\visual studio
2015\Projects\ConsoleApplication4\packages' Added package
'System.Threading.Tasks.Extensions.4.3.0' to 'packages.config'
Successfully installed 'System.Threading.Tasks.Extensions 4.3.0' to
ConsoleApplication4 Adding package 'Npgsql.3.2.4' to folder
'c:\users\paul.pmdev\documents\visual studio
2015\Projects\ConsoleApplication4\packages' Added package
'Npgsql.3.2.4' to folder 'c:\users\paul.pmdev\documents\visual studio
2015\Projects\ConsoleApplication4\packages' Install failed. Rolling
back... Package 'Npgsql.3.2.4 : System.Threading.Tasks.Extensions
[4.3.0, )' does not exist in project 'ConsoleApplication4' Removed
package 'System.Threading.Tasks.Extensions.4.3.0' from
'packages.config' Removing package 'Npgsql.3.2.4 :
System.Threading.Tasks.Extensions [4.3.0, )' from folder
'c:\users\paul.pmdev\documents\visual studio
2015\Projects\ConsoleApplication4\packages' Removed package
'Npgsql.3.2.4 : System.Threading.Tasks.Extensions [4.3.0, )' from
folder 'c:\users\paul.pmdev\documents\visual studio
2015\Projects\ConsoleApplication4\packages' Removing package
'System.Threading.Tasks.Extensions.4.3.0' from folder
'c:\users\paul.pmdev\documents\visual studio
2015\Projects\ConsoleApplication4\packages' Removed package
'System.Threading.Tasks.Extensions.4.3.0' from folder
'c:\users\paul.pmdev\documents\visual studio
2015\Projects\ConsoleApplication4\packages' Failed to add reference to
'System.Collections'. Please make sure that it is in the Global
Assembly Cache.
There is a bug logged for this on the npgsql issue tracker:
https://github.com/npgsql/npgsql/issues/1604
This is now fixed in 3.2.4.1 available on Nuget.
Related
TeamCity
I have a TeamCity project with a .NET CLI (dotnet) build step for a Visual Studio Solution ( .sln ).
The solution includes a SQL Project ( .sqlproj ).
Running this build-step gives error :
[build] D:\TeamCity\buildAgent\work\e9ff385151b10e4c\Services\AccountCharacteristics\Database-RoundHouse-Deploy1\Database\Database.sqlproj(67,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\2.2.101\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Database.sqlproj
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
<!-- Default to the v11.0 targets path if the targets file for the current VS version is not found -->
<SSDTExists Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets')">True</SSDTExists>
<VisualStudioVersion Condition="'$(SSDTExists)' == ''">11.0</VisualStudioVersion>
</PropertyGroup>
<Import Condition="'$(SQLDBExtensionsRefPath)' != ''" Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
<Import Condition="'$(SQLDBExtensionsRefPath)' == ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
So it appears that SQLDBExtensionsRefPath = C:\Program Files\dotnet\sdk\2.2.101\Microsoft\VisualStudio\v11.0\SSDT\
Apparently the .sqlproj defaults to 11.0 -- a very old version of Visual Studio.
How does SQLDBExtensionsRefPath get set ? How can I install/config the agent for the correct path ?
My agent has :
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VisualStudio\v16.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets
Also I notice that a NuGet package has been released :
https://www.nuget.org/packages/Microsoft.Data.Tools.Msbuild/
But it's not clear how to use it. It seems clear I need to reference the package in the VS .csproj. But then how to ensure that Visual Studio and Team City point to the Microsoft.Data.Tools.Schema.SqlTasks.targets in the package ( under the packages folder ) ?
Set it as an environment variable with
setx SQLDBExtensionsRefPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VisualStudio\v16.0\SSDT"
or by adding via the 'environment variables' in the Windows UI
See https://learn.microsoft.com/en-us/archive/blogs/ssdt/part-5-use-your-own-build-and-deployment-agent
Need your help
I have successfully installed VS2017 on my computer .
But when I tried to install SQL server data tools 15.6.0 or 15.5.1 it gives me error as below :
Setup failed
The configuration registry key could not be opened(0x800703F3)
Thanks All!!
The latest version (15.6) of SSDT is incompatible with the latest version (15.7) of Visual Studio 2017. You currently have two choices:
Wait for an updated version of SSDT or VS2017 to be released, or
Completely uninstall VS2017 and install an older version.
If you want to go with option 2, do the following:
Run this command: C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe -f
Download and install version 15.6.7 of Visual Studio (link to the Community edition)
Download and install SSDT 15.6.0
This info was taken from a post on the Visual Studio Developer Community forum.
We are slowly migrating to VS2017 and most of the project do that silently without much interference. Today started migrating a WPF project from VS2015 to VS2017. When I build the solution I get the following warning:
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
I googled the problem but I seem to be alone out there. I have no clue what could cause this. The .Net target is 4.5.1 but changing that to 4.6.2 make no difference. Neither does clean or remove bin and obj directories. Who has got a clue?
I encountered this problem while building from the command line after migrating from VS2017 to VS2019 for a solution containing class libraries. I found I had VS2017's version of MSBuild in my PATH environment variable - C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin. Removing that path from the environment variable and re-opening my console solved the issue.
VS2017 MSBuild autodetection takes MSBuild/v14 instead of v15 for WPF project
You can try to update the version of nuget.exe to the 4.0 and above in the .nuget folder.
Visual Studio 2017 comes with NuGet 4.0 and NuGet 4.0 Package Manager Extension is currently not available for Visual Studio 2015 (Visual Studio 2015 comes with NuGet 3.4.4, and NuGet 3.5.0 is available as an explicit download for Visual Studio 2015 as well).
According to your comment, it seems the old nuget.exe not detect the MSBuild version 15.0, so please try to update the nuget.exe to 4.0 and above in the .nuegt folder.
Besides, I found your solution that is still configured by old package restore method "MSBuild-integrated restore", which is the original Package Restore implementation and though it continues to work in many scenarios, it does not cover the full set of scenarios addressed by the other two approaches.
Automatic Package Restore is the NuGet team's recommended approach to Package Restore within Visual Studio. You can convert to use the automatic package restore. Check the following thread for details:
Nuget: Switching from "Enable Package Restore" to "Automatic Package Restore"
Hope this helps.
I recently have attempted to migrate a solution created and developed in Visual Studio (VS) 2012 to VS 2017.
I've managed to migrate all projects of my solution except for a Report Server Project. When I try to open my solution in VS 2017 I get the following message:
I click on Yes and VS automatically upgrades the project file (this is a file having the extension .rptproj)
When I now try to build the project I get the following error message:
Error Copying file Reports\Report\Project1\MyReportProject.rptproj.user to
obj\Debug\AspnetCompileMerge\Source\Reports\Report
Project1\MyReportProject.rptproj.user failed. Could not find file
'Reports\Report Project1\MyReportProject.rptproj.user'
I thought the upgrade would be performed transparently. Am I missing something? Is there any extra step I should take in order to do the upgrade?
Note: I've already downloaded and installed the latest version of Microsoft Reporting Services Projects .vsix package.
You can try the latest msbuild.exe for SSRS is here.
This includes steps of up-gradation of SSRS for both VS15 and VS17.
Once you install the latest update, depending on which version of Visual Studio you’re using, the new files enabling MSBuild for your projects will be installed in different folder path:
In Visual Studio 2017, it’ll will be a nested folder in your Visual Studio folder hierarchy. For example, the location with the Community Edition is in the Community folder:
Edit 1:
Try these steps:
1) Close Visual Studio - 17
2) Open VS-17 Installer
3) Try to install the SSDT workflow as:
I'm trying to integrate SourceLink into Visual Studio Team Services by using https://github.com/ctaggart/SourceLink
I have problems with it since the package seems unable to parse the URL of a VSTS repository.
Build started 8/22/2017 11:58:18 AM.
1>Project "D:\Repos\Core\classic-stats\src\Acme.Stats\Acme.Stats.csproj" on node 1 (Build target(s)).
1>SourceLinkCreate:
git rev-parse --show-toplevel
D:/Repos/Core/classic-stats
git config --get remote.origin.url
https://acme.visualstudio.com/DefaultCollection/Core/_git/classic-stats
git rev-parse HEAD
8c6a68b325cf10b67332aa2ea15db952a88d027d
SourceLinkUrl:
unable to convert OriginUrl: https://acme.visualstudio.com/DefaultCollection/Core/_git/classic-stats
1>Done Building Project "D:\Repos\Core\classic-stats\src\Acme.Stats\Acme.Stats.csproj" (Build target(s)) -- FAILED.
Build FAILED.
0 Warning(s)
0 Error(s)
AFAIK there's only support for GitHub and BitBucket, am I right?
Has anybody been able to integrate this into TFS builds?
Thanks
As Skorunka stated in his comment, SourceLink now has support for VSTS (recently renamed Azure DevOps)
Install the Microsoft.SourceLink.Vsts.Git Microsoft.SourceLink.AzureRepos.Git package in your project and add the following to your .csproj file
<PropertyGroup>
[...]
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
Configure your Build Pipeline to generate your Nuget package using the dotnet pack command. SourceLink doesn't work yet with the Nuget pack (based on my tests).
Push your changes to your Azure DevOps server and let the build pipeline generate your Nuget package and push it to your Nuget feed.
In Visual Studio go to tools -> Option -> Debugging -> General and ensure that
Enable just my code is not checked
Enable SourceLink support is checked
Then in any other project, install your Nuget package.
When you'll try to step into some code defined in your package's DLL, Visual Studio will ask if you want to Download source code and continue debugging. It will authenticate to your Azure DevOps server using your Git credentials, download the source code, and let you debug it.