Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No "generate bitfield" in light bulb #5

Open
fanoI opened this issue Apr 27, 2017 · 7 comments
Open

No "generate bitfield" in light bulb #5

fanoI opened this issue Apr 27, 2017 · 7 comments

Comments

@fanoI
Copy link

fanoI commented Apr 27, 2017

Using the "usual" sample code:

    struct DoubleView
    {
        enum BitFields
        {
            Fraction = 11,
            Exponent = 52,
            Sign = 1,
        }
    }

In the light bulb is only suggested to move the type in a new file nothing else!

@ufcpp
Copy link
Owner

ufcpp commented Apr 27, 2017

Does the analyzer work? Do you get error on Bit1 x = 2?
I supports only nuget 3 or higher, which means packages.conf isn't supported. Try using PackageReference in VS 2017 or project.json in VS 2015.

@fanoI
Copy link
Author

fanoI commented Apr 28, 2017

Yes Bit as variable works it is the analyzer that does nothing!
I'm using VS2017 so I imagine to have the last version of nuget...

@ufcpp
Copy link
Owner

ufcpp commented Apr 28, 2017

image

If you use packages.config as default package management format, change it to PackageReference.
Even if you use the latest NuGet.exe, NuGet stays old behavior with csproj containing packages.config.

@fanoI
Copy link
Author

fanoI commented Apr 28, 2017

Nothing to it does not work for me!
Tried with a Net Framework and a Net Core Console application...

You StructRecord generator worked and it was similar so what is happening?

@ufcpp
Copy link
Owner

ufcpp commented Apr 29, 2017

umm...

It works in my environment:
https://github.com/ufcpp/BitFields/tree/master/tests/TargetFrameworks
(However, the BitFields suppots only netstandard1.0, net45, netcore1.0 or higher.)

It might be due to Visual Studio caches. Could you try removing .vs folder and restart Visual Studio?

@fanoI
Copy link
Author

fanoI commented Apr 30, 2017

But the nuget package should not install an Analyzer too? I got on Bitfields a nothing else is this normal?

I had tried to compile it before you had done the NuGet package using the installer that where there... I've installed the .vsix plugin without obtaining nothing but maybe they have broken something?

@fanoI
Copy link
Author

fanoI commented May 20, 2017

Today at least I can see the "generate bitfield" in the light bulb but a file with only "// B/5, G/5, R/5" is generated!

All seems correct to me:

nugetconfig

this is the project configuration:

projectconfig

any ideas?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants