glitchenzo / nugetforunity Goto Github PK
View Code? Open in Web Editor NEWA NuGet Package Manager for Unity
License: MIT License
A NuGet Package Manager for Unity
License: MIT License
Currently it just throws an exception and doesn't save.
It would be helpful to be able to see the contents of a config file in the Inspector instead of having to go to Windows Explorer (and the like) to open the file in an external viewer.
It would be very helpful and would match NuGet in VS2013
nuget.exe supported local & network filepaths.
In removing the need for nuget.exe for list, install, and restore, a dependency was made for the HTTP API. This obviously doesn't work with filepaths, so another solution (and codepath) is needed for those.
It sometimes generates errors. Investigate what they are and why they appear.
Each package should display their immediate dependencies. This does not include dependencies of dependencies.
When downloaded, the packages are stored in a "nupkgs" folder. When installing, that directory should be checked before attempting to download a package from the web.
This will be helpful to track down issues. A setting needs to be available somewhere that turns the verbosity on full, but not in the code since it can't be edited and recompiled when distributed as a DLL.
This appears to be how the official NuGet client works.
This will make it easy for users to see what version they currently have installed.
There is currently a bug where only packages with a single dependency are supported.
Currently they force a reload of everything. This should be optimized in some way.
Log:
System.Net.WebException: The operation has timed out.
at System.Net.WebConnectionStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0
at System.IO.StreamReader.ReadBuffer () [0x00012] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/StreamReader.cs:338
at System.IO.StreamReader.Read (System.Char[] buffer, Int32 index, Int32 count) [0x00077] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/StreamReader.cs:415
at Mono.Xml2.XmlTextReader.ReadTextReader (Int32 remained) [0x00000] in <filename unknown>:0
at Mono.Xml2.XmlTextReader.PeekChar () [0x00000] in <filename unknown>:0
at Mono.Xml2.XmlTextReader.ReadText (Boolean notWhitespace) [0x00000] in <filename unknown>:0
at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0
at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0
at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0
at System.Xml.XmlWriter.WriteNode (System.Xml.XmlReader reader, Boolean defattr) [0x00000] in <filename unknown>:0
at System.Xml.XmlWriter.WriteNode (System.Xml.XmlReader reader, Boolean defattr) [0x00000] in <filename unknown>:0
at System.Xml.XmlReader.ReadOuterXml () [0x00000] in <filename unknown>:0
at System.ServiceModel.Syndication.SyndicationElementExtension+XmlReaderReadWriteHandler..ctor (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.ServiceModel.Syndication.SyndicationElementExtension..ctor (System.Xml.XmlReader xmlReader) [0x00000] in <filename unknown>:0
at System.ServiceModel.Syndication.SyndicationElementExtensionCollection.Add (System.Xml.XmlReader xmlReader) [0x00000] in <filename unknown>:0
at System.ServiceModel.Syndication.SyndicationItemFormatter.LoadElementExtensions (System.Xml.XmlReader reader, System.ServiceModel.Syndication.SyndicationItem item, Int32 maxExtensionSize) [0x00000] in <filename unknown>:0
at System.ServiceModel.Syndication.Atom10ItemFormatter.ReadXml (System.Xml.XmlReader reader, Boolean fromSerializable) [0x00000] in <filename unknown>:0
at System.ServiceModel.Syndication.Atom10ItemFormatter.ReadFrom (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.ServiceModel.Syndication.Atom10FeedFormatter.ReadItem (System.Xml.XmlReader reader, System.ServiceModel.Syndication.SyndicationFeed feed) [0x00000] in <filename unknown>:0
at System.ServiceModel.Syndication.Atom10FeedFormatter.ReadXml (System.Xml.XmlReader reader, Boolean fromSerializable) [0x00000] in <filename unknown>:0
at System.ServiceModel.Syndication.Atom10FeedFormatter.ReadFrom (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.ServiceModel.Syndication.SyndicationVersions.LoadFeed[SyndicationFeed] (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.ServiceModel.Syndication.SyndicationFeed.Load[SyndicationFeed] (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.ServiceModel.Syndication.SyndicationFeed.Load (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at NugetForUnity.NugetHelper.GetPackagesFromUrl (System.String url) [0x00045] in NugetHelper.cs:625
at NugetForUnity.NugetHelper.Search (System.String searchTerm, Boolean includeAllVersions, Boolean includePrerelease, Int32 numberToGet, Int32 numberToSkip) [0x000bb] in NugetHelper.cs:484
at NugetForUnity.NugetWindow.UpdatePackages () [0x00000] in NugetWindow.cs:199
at NugetForUnity.NugetWindow.OnEnable () [0x0002b] in NugetWindow.cs:174
UnityEngine.Debug:LogErrorFormat(String, Object[])
NugetForUnity.NugetWindow:OnEnable() (at Assets/NuGet/Editor/NugetWindow.cs:186)
Currently NugetHelper does all of the packages.config file loading/editing/saving. It should be pulled out into a separate class in a separate file.
Most NuGet servers need the correct API key to be passed in for a push command to work. This support needs to be added.
The default icon is currently the nuget.org default icon. We should use our own custom icon.
Bigger. Better Color. Search button.
In order to get the current server URL that is being used, the NuGet.config file should be parsed.
Sometimes the packages.config may be read-only. Currently if you try to install a package with a RO file, it throws an exception and doesn't install.
It should overwrite the file and install the package.
Dependencies can sometimes list the framework version for them. Be sure to use that data if it exists to skip incorrect dependencies.
For example: See here: https://www.nuget.org/api/v2/FindPackagesById()?$filter=IsAbsoluteLatestVersion&$orderby=Version%20desc&id=%27protobuf-net%27
Which lists these dependencies:
::net30|
::net40|
System.Reflection.Emit:4.0.1-beta-23516:net45|
System.Reflection.Emit:4.0.1-beta-23516:dnx451|
Microsoft.CSharp:4.0.1-beta-23516:dotnet54|
System.Diagnostics.Tools:4.0.1-beta-23516:dotnet54|
System.IO:4.0.11-beta-23516:dotnet54|
System.Text.Encoding:4.0.11-beta-23516:dotnet54|
System.Reflection.Emit:4.0.1-beta-23516:dotnet54|
System.Reflection.Emit.ILGeneration:4.0.1-beta-23516:dotnet54|
System.Reflection.Emit.Lightweight:4.0.1-beta-23516:dotnet54|
System.Reflection.TypeExtensions:4.1.0-beta-23516:dotnet54|
System.Xml.XmlSerializer:4.0.11-beta-23516:dotnet54|
System.Runtime.Serialization.Primitives:4.0.11-beta-23409:dotnet54
Add a search box like the one on the Online tab, but it will behave more like a filter.
Currently, it is "dumb" and only installs the specific version listed.
It should check to see if a later version is already installed and use that.
It should check to see if a later version is available on the server if the specific version is no longer on the server.
A %20 is showing up in filenames instead of a space. This should be fixed.
Since the dependencies should already be present, enumerate over all installed packages and show a selectable drop-down list.
It might be useful to have a system that allows pulling in a normal NuGet package or pulling in the files from the actual project.
I'm not sure how this would be done as Unity isn't happy with assets sitting outside of its Assets folder. Perhaps junction/symlinks would have to be used.
See here: https://visualstudiogallery.msdn.microsoft.com/68878c27-110c-43ec-ae61-3ea3f7aae88c
If a package is uninstalled, prompt the user if they would like to uninstall all dependencies (including dependencies of dependencies).
It's a trial to manually add dependencies sometimes. It would be helpful to have a method to auto-fill it.
The colors for the GUI look strange in the Free version of Unity. Make it look good in both cases.
It is currently only shown on the Online tab, but people should be able to update to prerelease versions.
Currently the operation are all blocking, which causes the entire Unity editor to be locked up while it is processing.
This should be made into multiple threads or make use of coroutines to try to prevent users from thinking Unity is frozen forever.
Currently the first 15 results are fetched, and the Show More button fetches another 15. Add a Show All button to fetch ALL packages.
Create some way of testing the entire system (restores from scratch, updates, prerelease version checks, etc).
Currently you have to copy and paste in a .nuspec file from another package. There should be an option in the Unity Asssets/Create menu to create a default .nuspec file.
Currently the style last used is "wrapped" around to the top (italic, bold, etc). This shouldn't be the case.
The code is currently compiled into the game-side instead of the editor-side. The files need to be moved into an Editor sub-folder in order to make Unity only compile it editor-side.
This is not very user friendly without some documentation on how to use it!
Info:
UnauthorizedAccessException: Access to the path "[filepath].dll" is denied.
System.IO.File.Delete (System.String path) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/File.cs:179)
System.IO.Directory.RecursiveDelete (System.String path) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Directory.cs:195)
System.IO.Directory.Delete (System.String path, Boolean recursive) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Directory.cs:205)
System.IO.DirectoryInfo.Delete (Boolean recursive) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/DirectoryInfo.cs:229)
(wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Delete (bool)
NugetForUnity.NugetHelper.DeleteDirectory (System.String directoryPath)
NugetForUnity.NugetHelper.DeleteDirectory (System.String directoryPath)
NugetForUnity.NugetHelper.DeleteDirectory (System.String directoryPath)
NugetForUnity.NugetHelper.Uninstall (NugetForUnity.NugetPackageIdentifier package, Boolean refreshAssets)
NugetForUnity.NugetHelper.Update (NugetForUnity.NugetPackageIdentifier currentVersion, NugetForUnity.NugetPackage newVersion)
NugetForUnity.NugetWindow.DrawPackage (NugetForUnity.NugetPackage package)
NugetForUnity.NugetWindow.DrawUpdates ()
NugetForUnity.NugetWindow.OnGUI ()
Currently it always sorts by most downloads. It would be nice to sort by name or by most dependencies.
Using nuget.exe requires crazy (and very error-prone) command line output parsing. Not only that, but it makes cross-platform a bit more complicated (Mono could be used to run it on Mac/Linux).
There are two main options:
Nuget.Core - This would have to be backported to .NET 3.5 since it targets .NET 4.5 and Unity only supports up to 3.5
Write an interface from scratch - Harder but it would allow the greatest amount of freedom. Nuget.Server and NuGet Gallery work via a standard OData/Atom HTTP system, so it could feasibly be used.
Currently, nuget.exe is required for the following operations:
list
install
restore
pack
push
The first 3 are required for package consumers, whereas the last 2 are only used by package producers. It might be an acceptable requirement to say that nuget.exe is needed for those features.
Add a try, catch, finally block to ensure it's not left open, even if exceptions are thrown.
Some packages list their dependencies using version ranges - using () and [] characters.
Use these to properly search for the right version to install.
Read the .nuspec file inside the .nupkg file instead of querying the server for data.
If no .nupkg file is found, it should output an error and continue instead of throwing an exception.
Currently bad things will happen if packages wihtout a License URL are listed. Some packages will get skipped.
It currently searches whenever anything is typed into the bar. This produces many slow queries for each entered character. Optimize by only searching when the Enter key is pressed.
Unity is terrible with it's handling of native DLLs, so this tool must provide some sort of additional support for them.
Unity requires native DLLs to be in the Assets/Plugins directory BUT Unity locks the files and there is no way to get it to release the lock without closing the Editor. This creates complications such as saving any open scene, closing, copying/overwriting whatever DLLs need to be copied, re-opening Unity with whatever scene/project it had open, and continuing with the installation of the packages.
Currently the file is reloaded whenever the project opens or the code gets recompiled. It doesn't get reloaded if ONLY the NuGet.config file is updated. There should be either an automatic reloading of it or a manual reload option available in the GUI.
It'd be better than having to write it into the text box every time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.