project-system | The NET Project System for Visual Studio | Code Editor library

 by   dotnet C# Version: 16.10.x License: MIT

kandi X-RAY | project-system Summary

kandi X-RAY | project-system Summary

project-system is a C# library typically used in Editor, Code Editor applications. project-system has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

A project system sits between a project file on disk (for example, .csproj and .vbproj) and various Visual Studio features including, but not limited to, Solution Explorer, designers, the debugger, language services, build and deployment. Almost all interaction that occurs with files contained in a project file happens through the project system.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              project-system has a medium active ecosystem.
              It has 906 star(s) with 388 fork(s). There are 118 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 592 open issues and 3326 have been closed. On average issues are closed in 285 days. There are 16 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of project-system is 16.10.x

            kandi-Quality Quality

              project-system has no bugs reported.

            kandi-Security Security

              project-system has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              project-system is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              project-system releases are available to install and integrate.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of project-system
            Get all kandi verified functions for this library.

            project-system Key Features

            No Key Features are available at this moment for project-system.

            project-system Examples and Code Snippets

            No Code Snippets are available at this moment for project-system.

            Community Discussions

            QUESTION

            VSIX Project - Properties tool window extension
            Asked 2021-Mar-04 at 14:54

            There might be something wrong with the way I search for things but here is my problem. I'm looking for a way to implement a custom editing tool within the properties tool window in the Visual Studio editor. I've been looking through several documentation references, and they all lead to the use of different assemblies, but I can't get anything to work the way that I want.

            First of all, I tried using the UITypeEditor class, with the step-by-step tuto I found here : https://docs.microsoft.com/fr-fr/dotnet/api/system.drawing.design.uitypeeditor?view=net-5.0 The problem I faced was that it only seemed to be working with Winforms projects, and I'm trying to use this with a WPF project.

            Afterwards, I tried following this tutorial, in order to create a project template : https://docs.microsoft.com/en-us/visualstudio/extensibility/creating-a-basic-project-system-part-1?view=vs-2019 This has led me to think that the methods used in the tutorial might have been either deprecated or improved with the used of AsyncPackages instead of ProjectPackages, and the appearance of the Microsoft.VisualStudio.Shell.Flavor assembly that seem to render useless the ProjectNode class (it doesn't even show up anymore, the method has been replaced with a void).

            The last bit I tried exploring was the use of the ProjectSystem, as documented here : https://github.com/microsoft/VSProjectSystem It was actually worse because I couldn't get it to work like I wanted, the project type I was creating could not register C# files and I wasn't able to add new classes (I might need to dig a bit deeper here but I don't know where to look).

            So basically, I'm looking for help to extend the properties tool window, through an editor within the window, or a modal window opened by clicking on an ellipsis button in the properties window.

            Thank you for reading this, if you have any info, I'm very interested.

            ...

            ANSWER

            Answered 2021-Mar-04 at 14:54

            I've actually found a thread leading to what I was trying to do here. This tutorial leads to a way to implement a customized editor, either inline, extended or in another dialog window. This was the thing I needed, and with a few tweaks I managed doing what I wanted.

            Source https://stackoverflow.com/questions/66337283

            QUESTION

            WPF controls not recognized in code-behind when using new CSPROJ format
            Asked 2019-Oct-01 at 21:10

            I've created a WPF application using the new CSPROJ format in Visual Studio 2017.

            By

            I can successfully build and run the application. However, I have an issue in that the code editor does not recognize any controls placed in the XAML, so I get erroneous errors and no intellisense in the editor.

            Steps to reproduce
            1. Launch VS 2017
            2. Create a new "WPF App (.NET Framework)" C# project
            3. Edit the csproj file to look like:

            Project file:

            ...

            ANSWER

            Answered 2017-May-28 at 21:19

            One slightly hacky solution is to edit the project file to add the generated classes. Unfortunately, I can't work out how to make the file be DependentUpon the XAML file - I think that only works for files in the same folder.

            In addition, you need to use MSBuild:UpdateDesignTimeXaml instead of MSBuild:Compile, as described here

            Finally, it appears you have to explicitly name every "Include" in the "Page" element - you can't use wildcards.

            Source https://stackoverflow.com/questions/44154271

            QUESTION

            My VS project keeps getting rebuilt using msbuild
            Asked 2019-Sep-15 at 22:47
            Latest:

            This is definitely a bug in msbuild. Other than that there cannot be any other explanation. This could only be happening on Linux or possibly on a wider range.

            So i decided to just build one single project with absolutely no dependencies on others in the solution.

            Looking at the captured diagnostics, I see these lines which are very promising:

            ...

            ANSWER

            Answered 2019-Sep-15 at 22:47

            There was one more problems in the dotnet platform and/or msbuild causing this to fail. One of those was this https://github.com/dotnet/project-system/issues/4736

            Installing SDK 3.0.100-preview7-012821 or better solved the problem

            Source https://stackoverflow.com/questions/57928335

            QUESTION

            The "GetReferenceNearestTargetFrameworkTask" task was not found
            Asked 2019-Aug-27 at 22:33

            I have problem with autocompletion in VS 2017 Community.

            Previously I had VS 2017 Enterprise from school, but key expired. So I moved to community.

            Before, everything works great, but now it doesnt work at all.

            I was here: enter link description here

            but doesnt work, so found another solution here: enter link description here

            And I got this:

            Build FAILED.

            C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1601,5): error MSB4036: The "GetReferenceNearestTargetFrameworkTask" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin" directory. 0 Warning(s) 1 Error(s)

            Time Elapsed 00:00:00.11

            Do you know what to do next?

            Thank you

            ...

            ANSWER

            Answered 2018-Feb-11 at 07:09

            Follow these to fix that error. This applies to VS 2017:

            Fix 1:

            1.Install Nuget PackageManager from here.

            2.Restart Visual Studio.

            If the problem is still there, continue below

            Fix 2:

            1.Download and start/run the Visual Studio Installer again.

            2.While the Visual Studio Installer is still running, go to the "Individual Components" tab

            3.Tick the "NuGet package manager" check-box that is under "Code tools" option.

            4.Click Install to install it.

            Screenshot of where this is located:

            That should fix the error you see in this question. Restart Visual Studio and test the auto-completion function. If it's not working, see the answers from this question as that is a whole different issue.

            Source https://stackoverflow.com/questions/47797510

            QUESTION

            Access files within resource directory in maven generated jar
            Asked 2019-Aug-03 at 16:59

            I've done my research, but I just really can't get it to work. I'm using Spring Boot with Maven. Thymeleaf and jquery for my frontend.

            My directory:

            ...

            ANSWER

            Answered 2018-Dec-18 at 06:52

            You cannot treat internal jar resource as a regular file, you need to ask classloader to do it for you, and the path would be relative to top level of the jar (so you want just to ask classloader to load "MOCK_DATA.json" without any paths), or to /resources folder. This is how to do it:

            Classpath resource within jar

            BTW. /src/main/resources folder is automatic in maven unless you need to configure filtering etc other then defaults :)

            Source https://stackoverflow.com/questions/53827709

            QUESTION

            How to trigger a design-time build on file change in Rider?
            Asked 2019-Feb-18 at 16:55

            I made a NuGet package which generates C# code from DSL files at design and build time. It works fine in Visual Studio but has some issues in Rider (which I'll describe below).

            In Visual Studio

            The package declares custom items for the DSL files, and assigns them a MSBuild:Compile Generator metadata, which triggers a design-time build in Visual Studio every time a file changes.

            Then, a custom target hooks to the build with BeforeTargets="CoreCompile". It generates the C# code and adds Compile items to the project. The target runs in both normal and design-time builds, and supports incremental builds to avoid unnecessary work.

            Here's the relevant (simplified and commented) MSBuild code:

            The props file:

            ...

            ANSWER

            Answered 2019-Feb-18 at 16:55

            I have two stories for you - the short one and the long one =)

            The short story

            It should work out of the box in the upcoming 2019.1 EAP 1

            The long story

            Rider (unlike Visual Studio) does not perform design time build during project loading stage. We thinks it is too expensive (especially for .net sdk based projects). So Rider evaluates every project and then builds some set of predefined targets to obtain generated files and assembly references.

            Sometimes it cause issues (like this one) so in 2019.1 we have implemented additional algorithm which scans all imported targets and looks for a custom item-factory targets. As far as I can see, your target perfectly fits so Rider will be able to find it and build alongs with predefined targets.

            If it will not work somehow you still will have two options:

            1. We have rewritten Build Tools option page, so you will be able to add any custom target to loading process
            2. Fire an issue here: https://youtrack.jetbrains.com/newIssue?project=Rider and I will try to fix your case ASAP. Such issues have the highest priority for us.

            Source https://stackoverflow.com/questions/54745217

            QUESTION

            Enumerate Files in a .csproj (dotnet core)
            Asked 2018-Oct-31 at 01:13

            I am working on a build tool in C# that should work with Visual Studio / MSBuild. I want to enumerate all files that are part of a C# project. The project format is the new (.NET Core) .csproj.

            The documentation describing the Project System points at using MSBuild (file format) or Common Project System (project tree). I'm unfamiliar with both APIs. Looking at documentation for those respective projects is not immediately helpful.

            As the expert probably knows, the new .csproj file does not list every file that is implicitly part of the project. On the other hand it may list a 'linked' file that is outside the project folder. I want to make sure I get all files that are considered part of the project.

            Ultimately I want to focus on a particular file type (.json), but I thought the general question was worth asking.

            To sum up: How can I write a C# library that leverages the appropriate packages to (hopefully easily) enumerate all the files in a csproj?

            ...

            ANSWER

            Answered 2018-Oct-30 at 19:12

            You can use Roslyn Analyzer Libraries to load csproject and access it's content as well as properties in program. you can follow instructions from this previous SO post, or use OpenProjectAsync(projectFilePath) method to load instance of Project class in Microsoft.CodeAnalysis namespace.

            Source https://stackoverflow.com/questions/53070977

            QUESTION

            Is my .csproj using the .NET project-system or the Common Project System
            Asked 2018-Mar-30 at 21:34

            I was reading through the documentation on the .NET foundation's GitHub repository for the .NET project-system and saw that the latest system used to run C# projects on Visual Studio is the new Project System by default; however, as the older system, Common Project System (CPS), is being phased out what are some signs to help me discern which version of the Project System my project is using?

            Is this determined by Visual Studio or will I be able to look at the .csproj file and know which system is being utilized to manage my projects?

            I am not looking for the version of the .NET SDK but rather which project system is running my solution's file organization and project manifest.

            ...

            ANSWER

            Answered 2018-Mar-30 at 21:34

            Thanks to concise and enlightening comments from Jonathan Tyson and Ian Mercer there are a few ways to tell which version of Project System a solution is using.

            1. As according to the Project System Documentation (link provided by Jonathan), you can tell based on the formatting of the project file.

            In the project file, when the Target Framework is formatted like this: net45 the project is using the new Project System. When formatted like this: v4.6.1 The project is utilizing the legacy Common Project System.

            2. A quick way to tell without opening the project file is to right-click on the file and if you can select Edit .csproj without having to unload the project it is using the new Project System (provided by Ian).

            Thank you guys for your insights!

            Source https://stackoverflow.com/questions/49581311

            QUESTION

            Build Error: Invalid resource directory name: "res renderers"
            Asked 2017-Jul-13 at 02:10

            Recently in my Xamarin.Forms solution, inside the Android project, I am getting the following build error:

            Invalid resource directory name: "res renderers"

            Doing a small amount of investigating I found the culprit inside the obj>Debug>res> folder. I tried deleting the folder and rebuilding but it seems to recreate it every time. I'm not sure why it started doing this and causing the IDE006 warning as well.

            Anyone know how to remedy this? Is there a way to configure the Android project to ignore this folder?

            ...

            ANSWER

            Answered 2017-Jul-13 at 01:42

            I had the same problem and I did the two followings to solve:

            1. try clean/build solution several times (after few times it worked for me)
            2. exit and come back.

            I hope this helps.

            Source https://stackoverflow.com/questions/45070077

            QUESTION

            Alternative to CfgPropertyPagesGuidsAddCSharp for Visual Studio 2010
            Asked 2017-May-30 at 15:55

            I am trying to develop a VSIX package that adds a tab to the project designer for a couple of custom project properties. I have the package working in VS 2013 using CfgPropertyPagesGuidsAddCSharp as described in this post. However, after porting the VSIX project to VS 2010, the custom property page is not loaded.

            This question from 2011 doesn't have an answer. The answer to another question suggests creating a custom project subtype, but that seems like an awful amount of work just to be able to edit some additional project properties from the GUI. This is my first time working on a VSIX package, so I'm trying to keep things as simple as possible.

            I've tried browsing through the source for the .NET project system, but I'm not sure exactly what I'd be looking for to properly register the page; any guidance would be much appreciated.

            Thanks.

            ...

            ANSWER

            Answered 2017-May-28 at 20:20

            Sometime ago I wrote a blog post describing how to add a custom property page using the CfgPropertyPagesGuidsAddCSharp property. Perhaps you can find it useful.

            Source https://stackoverflow.com/questions/43875554

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install project-system

            You can download it from GitHub.

            Support

            We welcome you to try things out, file issues, make feature requests and join us in design conversations. If you are looking for something to work on, take a look at our help wanted issues for a great place to start. Also be sure to check out our contributing guide. This project has adopted a code of conduct adapted from the Contributor Covenant to clarify expected behavior in our community. This code of conduct has been adopted by many other projects. For more information see Contributors Code of conduct.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/dotnet/project-system.git

          • CLI

            gh repo clone dotnet/project-system

          • sshUrl

            git@github.com:dotnet/project-system.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link