使用project.json调试Nuget项目 [英] Debugging Nuget projects with project.json

查看:62
本文介绍了使用project.json调试Nuget项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将所有解决方案从VS2013上的nuget 2.8(packages.config)更新到了VS2015上的最新nuget 3.5(project.json),都在.net 451上解决.我遇到的问题是参考路径.当我在packages.config上时,我可以设置参考路径 提供nuget项目的解决方案,以便调试我生成的nuget.但是,由于更新了project.json,所以我无法执行此操作.


有人知道是否仍支持此功能吗?如果我将符号设为nupkg,则可以调试,但是,这不是最佳选择,调试所需的时间比以前提供的参考路径更长.

解决方案

McMoses,

您的nuget项目类型是什么?

据我所知,.NET Core项目正在使用project.json文件来管理nuget包.如果您的nuget包是.NET Framework项目,则.NET Core项目无法直接引用它.因为他们使用不同的平台.所以,请 确认您的nuget项目与引用它的项目具有相同的平台.

我尝试创建一个.NET Core Nuget包项目,并在另一个.NET Core控制台应用程序中引用该项目,它可以成功调试到源代码中.

如果我的步骤有任何不同,请分享您的详细步骤,如何操作以帮助我们重现此问题.让我们确认这是否是VS2015问题是有益的.

最好的问候,
Weiwei


I recently updated all my solutions from nuget 2.8 on VS2013 (packages.config) to latest nuget 3.5 on VS2015 (project.json) all on .net 451. The problem I'm having is with Reference Paths. When I was on packages.config I could setup a reference path to the solution providing the nuget projects in order to debug my generated nugets. However, since the update to project.json I am unable to do this. 


Does anyone know if this feature is still supported? I can debug if I make a symbols nupkg, however, this is not optimal and takes considerably longer to debug than what Reference Paths offered before. 

解决方案

Hi McMoses,

What's your nuget project type?

As far as I know, the .NET Core projects are using project.json file to manage nuget packages. If your nuget package is a .NET Framework project, it could not be referenced by .NET Core project directly. Because they are using different platform. So please confirm your nuget project has the same platform with the project that reference it.

I have tried create a .NET Core Nuget package project and reference this project in another .NET Core Console application, it could be debugged into the source code successfully.

If there has any difference in my steps, please share your detailed steps how do you operate to help us reproduce this issue. It is benefit to let us confirm whether it is a VS2015 issue.

Best Regards,
Weiwei


这篇关于使用project.json调试Nuget项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆