Giter VIP home page Giter VIP logo

Comments (12)

jzabroski avatar jzabroski commented on June 2, 2024 1

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.

cezarypiatek avatar cezarypiatek commented on June 2, 2024

Hi,
What version of MappingGenerator and Visual Studio are you using?

from mappinggenerator.

netsharpdev avatar netsharpdev commented on June 2, 2024

MappingGenerator: 1.20.463 and VS: 16.8.2
also using Resharper if it matters. - 2020.2.4

from mappinggenerator.

cezarypiatek avatar cezarypiatek commented on June 2, 2024

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.

jzabroski avatar jzabroski commented on June 2, 2024

@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.

jzabroski avatar jzabroski commented on June 2, 2024

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.

netsharpdev avatar netsharpdev commented on June 2, 2024

@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.

cezarypiatek avatar cezarypiatek commented on June 2, 2024

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.

netsharpdev avatar netsharpdev commented on June 2, 2024

@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.
mappinggenerator

This screenshot has been taken at the same time when the previous one.
mappinggen2

from mappinggenerator.

cezarypiatek avatar cezarypiatek commented on June 2, 2024

@netsharpdev thanks for letting me know. Probably 1.9.269 version has invalid package id - this issue was fixed in the past.

from mappinggenerator.

jzabroski avatar jzabroski commented on June 2, 2024

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.

cezarypiatek avatar cezarypiatek commented on June 2, 2024

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)

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.