Skip to content
This repository has been archived by the owner on Apr 13, 2020. It is now read-only.

DisableCodeGeneration attribute should not clear existing Mixin code behind files #36

Open
ppittle opened this issue Dec 18, 2014 · 3 comments

Comments

@ppittle
Copy link
Owner

ppittle commented Dec 18, 2014

It was reported that DisableCodeGeneration attribute is removing Mixin code behind files on build. This should not occur.

@naskovai
Copy link

When I hit Ctrl + S in a file which contains a class I get an empty *.mixin.cs file even though the file I have saved doesn't contain any partial classes annotated with pMixinAttribute.

@ppittle
Copy link
Owner Author

ppittle commented Dec 18, 2014

And this is with the DisableCodeGeneration attribute defined at the assembly level (in AssemblyInfo.cs)?

@ppittle
Copy link
Owner Author

ppittle commented Dec 22, 2014

Hi Paletov,

I have tried to reproduce the behavior you are experiencing but haven't been able to.

Using Visual Studio 2013 Update 4 with pMixins 0.6.0.457 I performed the following steps:

  1. Create a new Project
  2. Add a dummy method AMethod to Class1
  3. Add a pMixin file, via the pMixin Item Template
  4. Add a pMixin definition:
      [pMixin(Mixin = typeof(Class1))]
      public partial class Mixin { }
  1. Confirmed pMixin code behind was generated.
  2. Add [assembly: CopaceticSoftware.pMixins.Attributes.DisableCodeGeneration] to AssemblyInfo.cs
  3. Build Project
  4. Confirmed (via pMixins Code Generator in Output Window ) no Code Generation occurred.
  5. Confirmed previous pMixin code behind file was still present and correct.

Can you send me the steps you took to setup your project to get the behavior you are seeing (generating empty pMixin code behind files on non valid targets and valid pMixin code behind files being erased)?

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

No branches or pull requests

2 participants