Giter Club home page Giter Club logo

Comments (24)

AdamBraden avatar AdamBraden commented on May 21, 2024

Have you been able to successfully build a blank Universal Windows application? Typically these errors are due the NuGet cache for .Net 5.0 not being downloaded.

from windows-universal-samples.

GrooverFromHolland avatar GrooverFromHolland commented on May 21, 2024

Yes i have i have a universal windows application running at the moment.

from windows-universal-samples.

GrooverFromHolland avatar GrooverFromHolland commented on May 21, 2024

Running two Solutions side by side(one working and one Microsoft/Windows-universal-samples
Webview not working) I found some differences in references and tried to download the missing one with Nuget Package Manager and got the following result :

PM> Install-Package Microsoft.NETCore.UniversalWindowsPlatform
Attempting to gather dependencies information for package 'Microsoft.NETCore.UniversalWindowsPlatform.5.0.0' with respect to project 'WebView', targeting 'UAP,Version=v10.0.10240'
Attempting to resolve dependencies for package 'Microsoft.NETCore.UniversalWindowsPlatform.5.0.0' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Microsoft.NETCore.UniversalWindowsPlatform.5.0.0'
Resolved actions to install package 'Microsoft.NETCore.UniversalWindowsPlatform.5.0.0'
Install failed. Rolling back...
Package 'Microsoft.NETCore.Platforms 1.0.0' does not exist in project 'WebView'
Package 'Microsoft.NETCore.Platforms 1.0.0' does not exist in folder 'C:\Users****\Documents\Visual Studio 2015\Samples\Windows-universal-samples-master\Samples\WebView\js\packages'
Install-Package : Could not install package 'Microsoft.NETCore.Platforms 1.0.0'. You are trying to install this package into a project that targets 'UAP,Ver
sion=v10.0.10240', but the package does not contain any assembly references or content files that are compatible with that framework. For more information,
contact the package author.
At line:1 char:2

  • Install-Package Microsoft.NETCore.UniversalWindowsPlatform
  • CategoryInfo : NotSpecified: (:) [Install-Package], Exception
  • FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

PM>

Maybe this is a clue to resolve this.

from windows-universal-samples.

AdamBraden avatar AdamBraden commented on May 21, 2024

Try deleting the hidden file Project.Lock.json that is in any of the folders, and retry.

Additionally, this is a large sample that pulls in many language technologies. Change your target to "x86" instead of "Any CPU".

from windows-universal-samples.

GrooverFromHolland avatar GrooverFromHolland commented on May 21, 2024

I could not find Project.Lock.json (made sure all files were visible).
Deleting Project.Lock.json in working project gave me the same kind of errors , so i decide to add a random Project.Lock.json file, rebuild the solution.
This reduced the amount of errors from 84 to 22.
I Think all the remaining and 4 warnings are because of the random Project.Lock.json file.
How can i get the Project.Lock.json file.belonging to webView sample?

from windows-universal-samples.

shinsenai avatar shinsenai commented on May 21, 2024

I've found that this error is common to all projects that were built with VS 2015 RTM and then moved to VS 2015 final. The files project.json and project.lock.json were not present/necessary up to RTM, but are now required apparently. If they are not there you get thousands of error because of the missing references listed in the json file. The easiest way out I've found is to create an new empty project and copy the two json files to your existing project. It might also be necessary to add a reference to the json file in the project csproj file. Just open the empty project csproj file to see where to add the reference. In my case all errors have disappeared after doing this (except a few problems with duplicate references due to older libraries still referenced)

from windows-universal-samples.

oldnewthing avatar oldnewthing commented on May 21, 2024

shinsenai is correct. The Project.lock.json file should be autogenerated by Visual Studio from the project.json file. Can you tell us what version of Visual Studio you are using? (The project.json requirement arrived very late.)

from windows-universal-samples.

GrooverFromHolland avatar GrooverFromHolland commented on May 21, 2024

This is the version I am using:
Microsoft Visual Studio Community 2015 Version 14.0.23107.0 D14REL
Microsoft .NET Framework Version 4.6.00079
Installed Version: Community
Visual Basic 2015 00322-20000-00000-AA822 Microsoft Visual Basic 2015
Visual C# 2015 00322-20000-00000-AA822 Microsoft Visual C# 2015
Visual C++ 2015 00322-20000-00000-AA822 Microsoft Visual C++ 2015
Windows Phone SDK 8.0 - ENU 00322-20000-00000-AA822 Windows Phone SDK 8.0 - ENU
Application Insights Tools for Visual Studio Package 1.0 Application Insights Tools for Visual Studio
ASP.NET and Web Tools 14.0.20626.0 ASP.NET and Web Tools ASP.NET Web Frameworks and Tools 2013 5.2.30624.0
Common Azure Tools 1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

On Microsoft Windows 10 Home 10.0.10240 Build 10240
Processor Intel(R) Core(TM) i5 CPU M 430 @ 2.27GHz, 2267 MHz, 2 core('s), 4 logic processor(s)

from windows-universal-samples.

AdamBraden avatar AdamBraden commented on May 21, 2024

JS projects can be "Any CPU", however in general for UWP projects, CS cannot be anycpu. Change your build target to "x86". This is the cause for most of the errors.

It also looks like WebView has a bad reference to System.Numerics.Vectors and System.Numerics.Vectors.WindowsRuntime. in the StreamURIResolverCS.csproj. Delete these.
Then do "Build->Clean" and then "Build->Rebuild All"

We'll clean up the references in the next update.

from windows-universal-samples.

GrooverFromHolland avatar GrooverFromHolland commented on May 21, 2024

I have my target as x86 and noticed the bad references, but there is more:
After updating NuGet package manager and copying Project.Lock.json file from Blank App
and rebuild I have 0 errors but cannot debug or run the app.
Shared content is not copied into solution.
I will try to copy these into the solution and let U know if it succeeds.

from windows-universal-samples.

AdamBraden avatar AdamBraden commented on May 21, 2024

Did you unzip the entire repo or only extract specific samples? You should unzip the entire repo as the projects use Visual Studio Links to refer to the SharedContent folder.
Also the Project.Lock.json file should be regenerated. If it is not, then you should double check your nuget options:

•Verify both "package restore" options are checked
◦Right-click on project, choose "Manage NuGet packages
◦Open settings (click on the small "gear" icon in the top right
◦verify both "package restore" options are checked
•After adding the package source, exit VS, goto the project directory and delete the package.lock.json file. Reload the project, Clean then ReBuild

from windows-universal-samples.

GrooverFromHolland avatar GrooverFromHolland commented on May 21, 2024

Packet package restore options were not checked, fixt that,
updated Nuget Packet sources,
deleted all the webview projects I messed with.
Did a new unzip of the entire Repo.
Reloaded the project, ReBuild : 0 errors, 5 warnings:
Warning Could not resolve this reference. Could not locate the assembly "System.Numerics.Vectors, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". In StreamUriResolverCS
Warning No way to resolve conflict between "System.Numerics.Vectors, Version=4.1.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" and "System.Numerics.Vectors, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Choosing "System.Numerics.Vectors,
Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. In StreamUriResolverCS
Warning The referenced component 'System.Numerics.Vectors' could not be found. In StreamUriResolverCS
Warning The referenced component 'System.Numerics.Vectors.WindowsRuntime' could not be found.In StreamUriResolverCS
Warning 0xdef00520 Invalid qualifier: INTELLISENSE-SETUP WebView C:\Users***\Downloads\Windows-universal-samples-master(1)\Windows-universal-samples-master\Samples\WebView\js\MakePRI 1

Shared content is still not copied into solution so cannot debug or run.

Project.Lock.json file not visible in solution, but after saving project it is in StreamUriResolverCS file.

from windows-universal-samples.

AdamBraden avatar AdamBraden commented on May 21, 2024

see my earlier comment about removing the unnecessary System.Numerics references:

It also looks like WebView has a bad reference to System.Numerics.Vectors and System.Numerics.Vectors.WindowsRuntime. in the StreamURIResolverCS.csproj. Delete these.
Then do "Build->Clean" and then "Build->Rebuild All"

from windows-universal-samples.

GrooverFromHolland avatar GrooverFromHolland commented on May 21, 2024

Removed unnecessary System.Numerics references.
Now 0 errors , 1 warning: 0xdef00520 Invalid qualifier: INTELLISENSE-SETUP WebView C:\Users***\Downloads\Windows-universal-samples-master(1)\Windows-universal-samples-master\Samples\WebView\js\MakePRI 1
Project.Lock.json file now visible in solutionExplorer.
Shared content is still not copied into solution so cannot debug or run.

from windows-universal-samples.

AdamBraden avatar AdamBraden commented on May 21, 2024

Sharedcontent is not copied locally, it is already linked in the project file. You should be able to F5 and debug or run. What error do you get when you F5 or when you do Build->Deploy?

from windows-universal-samples.

GrooverFromHolland avatar GrooverFromHolland commented on May 21, 2024

Just a messageBox poping up.
Message:The debugger cannot continue running the process. Unable to start debugging.
Nothing else.

from windows-universal-samples.

oldnewthing avatar oldnewthing commented on May 21, 2024

I get that too. Run the program without the debugger. Something about JS debugging is messed up.

from windows-universal-samples.

GrooverFromHolland avatar GrooverFromHolland commented on May 21, 2024

I have no option to run the program without the debugger?
Tried diagnostic tools: could not start diagnostic session but got output:
1>------ Build started: Project: StreamUriResolverCS, Configuration: Release x86 ------
1> StreamUriResolverCS -> C:\Users***\Downloads\Windows-universal-samples-master(1)\Windows-universal-samples-master\Samples\WebView\js\StreamUriResolverCS\bin\x86\Release\SDK.WebViewSampleCS.winmd
2>------ Build started: Project: StreamUriResolverCPP, Configuration: Release Win32 ------
2> StreamUriResolver.cpp
2> Creating library C:\Users*_\Downloads\Windows-universal-samples-master(1)\Windows-universal-samples-master\Samples\WebView\js\Release\StreamUriResolverCPP\StreamUriResolverCPP.lib and object C:\Users\Hans\Downloads\Windows-universal-samples-master(1)\Windows-universal-samples-master\Samples\WebView\js\Release\StreamUriResolverCPP\StreamUriResolverCPP.exp
2> Generating code
2> All 1744 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
2> Finished generating code
2> StreamUriResolverCPP.vcxproj -> C:\Users_**\Downloads\Windows-universal-samples-master(1)\Windows-universal-samples-master\Samples\WebView\js\Release\StreamUriResolverCPP\StreamUriResolverCPP.dll
3>------ Build started: Project: WinRTComponent, Configuration: Release Win32 ------
3> pch.cpp
3> WinRTSharedObject.cpp
3> WinRTToastNotificationWrapper.cpp
3> Creating library C:\Users*
_\Downloads\Windows-universal-samples-master(1)\Windows-universal-samples-master\Samples\WebView\js\Release\WinRTComponent\WinRTComponent.lib and object C:\Users\Hans\Downloads\Windows-universal-samples-master(1)\Windows-universal-samples-master\Samples\WebView\js\Release\WinRTComponent\WinRTComponent.exp
3> Generating code
3> All 243 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
3> Finished generating code
3> WinRTComponent.vcxproj -> C:_**\Hans\Downloads\Windows-universal-samples-master(1)\Windows-universal-samples-master\Samples\WebView\js\Release\WinRTComponent\WinRTComponent.dll
4>------ Build started: Project: WebView, Configuration: Release x86 ------
4>MakePRI : warning 0xdef00520: Invalid qualifier: INTELLISENSE-SETUP
5>------ Deploy started: Project: WebView, Configuration: Release x86 ------
5>Creating a new clean layout...
5>Copying files: Total 20 mb to layout...
5>Checking whether required frameworks are installed...
5>Registering the application to run from layout...
5>Deployment complete (7052ms). Full package name: "c2adb9af-edb3-4e57-8056-9d0531d4a6b2_1.0.0.0_x86__8wekyb3d8bbwe"
========== Build: 4 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========

from windows-universal-samples.

oldnewthing avatar oldnewthing commented on May 21, 2024

Launch it from the Start menu.

from windows-universal-samples.

AdamBraden avatar AdamBraden commented on May 21, 2024

Very strange. I will contact some folks in Visual Studio to see what they think might be the problem.

In the mean time, can you try another simple sample. ContextMenu has C#, CPP, and JS versions. try all 3 and see if you can debug. Be sure to set your config to "Debug|x86" for

from windows-universal-samples.

AdamBraden avatar AdamBraden commented on May 21, 2024

(accidentally hit comment to early)
"Debug|x86" for C# and CPP.

from windows-universal-samples.

GrooverFromHolland avatar GrooverFromHolland commented on May 21, 2024

App is running from Start menu!!!!
Hope to be able to use debugging soon, so I can modify code for learning the right way for making universal Apps.
Thank You all for now.

from windows-universal-samples.

ericleigh007 avatar ericleigh007 commented on May 21, 2024

I hope something is being done on this one, specifically the reason the building RC samples stopped building in RTM.
In my case, I ended up adding the project.lock.json file from a blank file, and then after reading this text, deleting it, and NOT changing the NUget settings, but then restarting Visual Studio, and restarting, and suddenly, and inexplicably, the project.lock.json got created.
The creation or not of project.lock.json seems to be causing these problems. Have you guys discovered why sometimes that file doesn't get created, even in the case of having all the nugget settings correct?
-thanks

from windows-universal-samples.

oldnewthing avatar oldnewthing commented on May 21, 2024

You'll have to ask the Visual Studio team.

from windows-universal-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.