I want to modernize site pages by following the .NET version of this Microsoft Blog: Modernize your SharePoint Pages I added the nugget package, I use a SharePoint Online Url.

When I get to the code

PageTransformator pageTransformator = new PageTransformator(ctx);

I get the error

Could not find file 'C:\Program Files (x86)\IIS Express\webpartmapping.xml'.

Altough I have the webpartmapping.xml in the project.

Webpartmapping file in solution explorer

and the webpartmapping properties are "copy always". Webpartmapping properties

Any idea why I get this error?


Found it! Thinking about it, it was a stupid question :P

Just took the file from my project, found at the location in the file's properties: Location of file

and moved it to the location given in the error.

Tadaah, it works.

Although I expected it to do be moved automatically. Maybe because I don't have Visual Studio opened as Administrator (for reasons)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.