4

I am creating a blank UWP using Visual Studio 2015

I am getting the following errors every time i try to build

Error   CS1061  'MainPage' does not contain a definition for 'InitializeComponent' and no extension method 'InitializeComponent' accepting a first argument of type 'MainPage' could be found (are you missing a using directive or an assembly reference?)


Error       Value cannot be null.
Parameter name: path1

enter image description here

I tried uninstalling the windows software developement kit then installing it with no luck

I had a working project but now it's giving the same error

The targets in the .csproj are as following

<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.14393.0</TargetPlatformMinVersion>
Ibra Him
  • 155
  • 1
  • 2
  • 10

1 Answers1

0

Make sure that namespace is correct in both file MainPage.xaml.cs and MainPage.xaml.

Example:-

XAML

C#

After cross check if same issue persist then delete obj and bin folder from the solution and then rebuilt solution again.

Jitendra.Suthar
  • 110
  • 2
  • 4