Comments (12)
Thank you. I'm still a newbie and trying to write my first set of analyzers/code fixes, so your explanation helps correct some knowledge gaps. Very appreciated.
from mappinggenerator.
Hi,
What version of MappingGenerator and Visual Studio are you using?
from mappinggenerator.
MappingGenerator: 1.20.463 and VS: 16.8.2
also using Resharper if it matters. - 2020.2.4
from mappinggenerator.
I'm not able to reproduce the problem and it looks more like a VS bug. According to the error message there's a problem with 'MappingGenerator, Version=1.0.0.0,
- I checked the published VSIX package (as well as recent nuget packages) and it contains assembly with correct version attribute 1.20.463
. What distribution of MappingGenerator are you using? VSExtension or nuget package? If it's a VSIX then please uninstall the extension, clean up the temp dir and install it again. Please let me know if that helped.
from mappinggenerator.
@netsharpdev Is it possible you have both the nuget package and VSIX extension installed?
@cezarypiatek What happens when that occurs, anyway? Say I Install the VSIX extension 1.20.463 and a coworker checks in a change with <PackageReference Include="MappingGenerator" Version="Some.Other.Version" />
, and I take latest and run restore packages. What happens?
from mappinggenerator.
I wonder if the MappingGenerator VSIX extension should actually be a MappingGenerator.Locator that, on load, first checks the solution for nuget packages, and instead of providing a Generate mapping code hint, instead providesa "Install MappingGenerator package" hint.
Does that make sense? It's probably way cleaner because people tend to update nuget packages more often than VSIX extensions in my experience.
from mappinggenerator.
@cezarypiatek I had VSIX but repeated your steps and still have the same.
@jzabroski I had no nuget package installed together with VSIX.
Currently, I removed VSIX and installed nuget and it seems to work perfectly fine.
from mappinggenerator.
Hi @jzabroski
The preferred way to "consume" MappingGenerator is VSIX when you are the VS user. The nuget package is intended only for JetBrains Rider IDE user. MappingGenerator is created using CodeRefactoring API. Visual Studio is not supporting code refactoring's distributed as nuget packages - only analyzers and code fixes are supported. On the other hand, Rider doesn't support VSIX but it's able to load code refactorings from the nuget.
from mappinggenerator.
@cezarypiatek I think i have found an issue. Somehow I had installed two "MappingGenerators" one with 1.9.269 version and another with 1.20.468. I uninstalled the old version and installed once again the latest one and it is fine. I am closing an issue.
This screenshot has been taken at the same time when the previous one.
from mappinggenerator.
@netsharpdev thanks for letting me know. Probably 1.9.269 version has invalid package id - this issue was fixed in the past.
from mappinggenerator.
Visual Studio is not supporting code refactoring's distributed as nuget packages - only analyzers and code fixes are supported.
Got it. I did not understand there was a difference between "code refactoring" and "code fix." Seems rather baroque but Visual Studio tends to have baroque policies.
from mappinggenerator.
Code fixes are a kind of "refactoring" that are suggested for reported diagnostic. The code refactorings are not connected with the diagnostics. That's the main difference. There's also a difference how VS is handling those two types of roslyn extensions, which I described in my latest comment about that.
from mappinggenerator.
Related Issues (20)
- NullReferenceException on omitted type parameter HOT 4
- Source Generators HOT 4
- Mapping properties of one type on another HOT 1
- Inconsistent behaviour HOT 17
- Implement Clone Method refactoring has issues with arrow functions
- Allow different spellings for comparison HOT 6
- Use the existing instance instead of creating a new one HOT 9
- Generate unit tests HOT 3
- Suggestion: Scaffold invocation on multiple lines. HOT 2
- Suggestion: Varying sample data HOT 3
- How do I "Verify your Roslyn integration option in case you are using R#."? HOT 2
- VSCode extention ? HOT 1
- ValueCollection appears to cause crash on Quick Action HOT 3
- UnitTest generator? HOT 2
- Visual Studio Performance slowing down HOT 1
- Fix NuGet package OnBuildGenerator HOT 4
- Improve interaction with `[InitRequired]` HOT 6
- Mapping from nullable structs to simple value handled incorrectly
- Generating mapping expression for C# 9 positional records HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mappinggenerator.