project-system | The NET Project System for Visual Studio | Code Editor library
kandi X-RAY | project-system Summary
kandi X-RAY | project-system Summary
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
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of project-system
project-system Key Features
project-system Examples and Code Snippets
Community Discussions
Trending Discussions on project-system
QUESTION
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:54I'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.
QUESTION
I've created a WPF application using the new CSPROJ format in Visual Studio 2017.
By
- setting the LanguageTargets,
- setting the generator for XAML files,
- setting the build action for App.Xaml,
- and forcing the debug executable
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- Launch VS 2017
- Create a new "WPF App (.NET Framework)" C# project
- Edit the csproj file to look like:
Project file:
...ANSWER
Answered 2017-May-28 at 21:19One 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.
QUESTION
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:47There 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
QUESTION
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:09Follow 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.
QUESTION
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:52You 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:
BTW. /src/main/resources folder is automatic in maven unless you need to configure filtering etc other then defaults :)
QUESTION
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 StudioThe 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:55I have two stories for you - the short one and the long one =)
The short storyIt should work out of the box in the upcoming 2019.1 EAP 1
The long storyRider (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:
- We have rewritten
Build Tools
option page, so you will be able to add any custom target to loading process - 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.
QUESTION
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:12You 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.
QUESTION
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:34Thanks 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!
QUESTION
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:42I had the same problem and I did the two followings to solve:
- try clean/build solution several times (after few times it worked for me)
- exit and come back.
I hope this helps.
QUESTION
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:20Sometime ago I wrote a blog post describing how to add a custom property page using the CfgPropertyPagesGuidsAddCSharp
property. Perhaps you can find it useful.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install project-system
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page