Explicit nuget package reference required for derived class #188
-
I am using ControlzEx nuget package in a project A.csproj and have added a derived class
Now I want to use this derived window in another assembly B.exe as the main window. When I try to build project B I get an error saying
allthough ControlzEx.dll exists in output folder next to B.exe. The error will only disappear and properties are resolved if I add the ControlzEx nuget package as a direct reference to B.csproj. Since I've done this kind of enhancing external controls many times without problems, I don't understand why the additional nuget reference in B.csproj is required. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Could you provide a repro project? |
Beta Was this translation helpful? Give feedback.
-
Sorry for late response, returning to this project after two weeks. |
Beta Was this translation helpful? Give feedback.
-
@redstripes89 I could reproduce your issue using your repro. After some pocking i added So it's not an ControlzEx issue. ;-) |
Beta Was this translation helpful? Give feedback.
-
Thank you for clarification. Will check this with our project and see if the new csproj format can avoid this issue. |
Beta Was this translation helpful? Give feedback.
@redstripes89 I could reproduce your issue using your repro.
After some pocking i added
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
to both projects, which resolved the MC1000 error. So this seems kind of related to the "old" csproj format.Afterwards i still got compile errors because the namespace for your "App" project was "App" and the main application class was also named "App" this confused the compiler and it complained about being unable to find the class "App.App".
After changing the namespace to "MyApp" and replacing it's usages everything compiles fine.
So it's not an ControlzEx issue. ;-)