Scottintexas
Well-known member
I have migrated a .Net 4.5 to .Net Standard 2.1 and I am now working through errors. I am missing some references or Nuget packages. But I cannot find them. For example (and there are several), The App.g.cs file that is automatically created by VS has several references that say "The type or namespace ... does not exist in the System.Windows namespace. As in all of these. But I cannot get a reference to System.Windows.
Another is;
Where
And, what I consider the worst, is a partial class derived from
My csproj file includes
Finally, none of my views are visible, just the XAML. So something didn't get created when I made the changes to .Net Standard. Can anyone tell me what I need to do to get the missing references?
C#:
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
Another is;
C#:
[assembly: ThemeInfo(
ResourceDictionaryLocation.None,
ResourceDictionaryLocation.SourceAssembly
)]
Where
ThemeInfo
is not an attribute class and ]ResourceDictionaryLocation
does not exist in the current context.And, what I consider the worst, is a partial class derived from
UserControl
can't compile because the type or namespace UserControl
cannot be found. The solution here is to include a reference to PresentationFramework. But I cannot find it.My csproj file includes
C#:
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<UseWPF>true</UseWPF>
</PropertyGroup>
Finally, none of my views are visible, just the XAML. So something didn't get created when I made the changes to .Net Standard. Can anyone tell me what I need to do to get the missing references?
Last edited by a moderator: