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

dotnet watch stops to work when having a resource (resx) file in the project #139

@WGroenestein

Description

@WGroenestein

Functional impact

Can't use dotnet watch, instead have to manual dotnet run on change

Minimal repro steps

  1. File => New Project => .NET Core => ASP.Net Core Web Application (.NET Core) => Web Application
  2. Add folder "Resources"
  3. Create new resource file in the create folder (e.g. Strings.resx)
  4. Add dotnet watch (1.0.0-preview2-final) to tools in project.json
  5. Run dotnet restore
  6. Run dotnet watch run

Expected result

dotnet watch working when having 1 or multiple resource files in the project.

Actual result

[DotNetWatcher] info: Running dotnet with the following arguments: run
[DotNetWatcher] info: dotnet process id: 1992
Unhandled Exception: System.AggregateException: One or more errors occurred. (One or more errors occurred. (Object reference not set to an instance of an object.)) ---> System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.DotNet.Watcher.Core.Internal.FileWatcher.<>c__DisplayClass7_0.<AddDirectoryWatcher>b__0(KeyValuePair`2 d)
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
   at Microsoft.DotNet.Watcher.Core.Internal.FileWatcher.AddDirectoryWatcher(String directory)
   at Microsoft.DotNet.Watcher.Core.Internal.ProjectWatcher.<WaitForChangeAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.DotNet.Watcher.Core.DotNetWatcher.<WaitForProjectFileToChangeAsync>d__7.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Microsoft.DotNet.Watcher.Core.DotNetWatcher.<WatchAsync>d__6.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Microsoft.DotNet.Watcher.Tools.Program.<>c__DisplayClass3_0.<MainInternal>b__0()
   at Microsoft.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at Microsoft.DotNet.Watcher.Tools.Program.MainInternal(String[] args, CancellationToken cancellationToken)
   at Microsoft.DotNet.Watcher.Tools.Program.Main(String[] args)

Further technical details

  • VS2015 Community Update 3
  • .NET Core 1.0.0 VS 2015 Tooling Preview 2
  • Windows 10 home x64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions