Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Fix null ref exception when referencing csproj #138

Merged
merged 1 commit into from
Jul 15, 2016

Conversation

victorhurdugaci
Copy link
Contributor

Fixes #136

The issue is that for xproj files we don't have a project path even though they appear as project references. The fix is to ignore those projects. The consequence is that dotnet watch will not restart the app when code files change in csproj files.

Please review @BrennanConroy

@@ -48,7 +48,11 @@ public Project(ProjectModel.Project runtimeProject)
if (File.Exists(projectLockJsonPath))
{
var lockFile = LockFileReader.Read(projectLockJsonPath, designTime: false);
ProjectDependencies = lockFile.ProjectLibraries.Select(dep => GetProjectRelativeFullPath(dep.Path)).ToList();
ProjectDependencies = lockFile.ProjectLibraries
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need to select twice?

@BrennanConroy
Copy link
Member

Is this a feature we will be enabling in the future?

@victorhurdugaci
Copy link
Contributor Author

Nope. It's not possible. For an xproj, a csproj is just a dll. It has no notion of where it came from

@BrennanConroy
Copy link
Member

:shipit:

@victorhurdugaci victorhurdugaci merged commit c769d8d into dev Jul 15, 2016
@victorhurdugaci victorhurdugaci deleted the victorhu/csproj-refs branch July 15, 2016 17:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants