Closed IngoBleile closed 6 years ago
@IngoBleile what's the library you're adding? What options did you choose when creating the project? Have you changed anything else since creating the project?
(I am using VS 2017 15.5 Preview 1.)
can you provide a repro? Does this same behavior happen with a file-> new?
We treat stuff like this very serious but we need a way to hook a debugger into it / reproduce it. If you can provide step by step or a WTS project with the issue, we can start poking into it
Hiya! I'm facing a problem very similar to this one. I've written a question about it on Stack Overflow here: https://stackoverflow.com/q/46501682/2466716
Even with the most current Win 10 preview (1709 Build 16299.15), VS 2017 15.5 Preview 1 and the most current Windows Template Studio (1.3.17255.1), I am having the same issues. It seems related to MVVM Light as I am getting another error in a "MVVM basic" project (stack overflow in a navigation helper, as soon as I add my library).
The error occurs as soon as I change this:
namespace MyApp
{
public static class Enums
{
public enum MessageType
{
Info,
Warning,
Error
}
to this:
namespace MyApp
{
public enum MessageType
{
Info,
Warning,
Error
}
The latest version published version from Windows Template Studio is 1.3. I'm going to try to make a repro with that version and with the current pre-release (1.4 will be published soon)
Can someone provide a repro so we can throw a debugger against it and see diffs between generated code and modifications made
It's quite easy, takes just one minute.
using System;
namespace ClassLibrary1
{
public enum MessageType
{
Info,
Warning,
Error
}
}
The error occurs when the execution leaves the App() constructor.
Hi,
I been able to reproduce this behavior using the v1.3 of Windows Template Studio.
I've verified that the issue is not constrained to MVVM Light. If you chose the combination Blank + Code Behind you'll have the same behavior. I've found a couple of references related to this, one which explictly mention that this is not a bug.
The root cause is related to a version inconsistence with NET Standard libraries used by the UWP app (created with WTS) and the NET Standard class library.
If you are using the v1.3 of WTS and the latest win SDK (16299), you can get rid of this issue by changing the Microsoft.NETCore.UniversalWindowsPlatform reference from 5.2.3 to 6.0.1 in the .csproj file Before:
After:
Or you can take advantage of the recently launched pre-release version of Windows Template Studio recently released and now targeting the latest 16299 sdk and 6.0.1. (v0.9.17286.1 or higher).
Hope this helps.
@ralarcon: You made my day, thanks a lot! :)
BTW: After trying the same with a MVVM Basic (not MVVM Light) project template, I got a stack overflow exception at a navigation helper's Frame.Navigate() method. But my problem is solved now, thanks again.
can this be closed out?
I think so!
As soon as I add a reference to a very simple .NET Standard 2.0 class library, I am getting this error.