-
Notifications
You must be signed in to change notification settings - Fork 19
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
Upgrade to VS Version 17.4.0 Preview 2.0 and I can't drop Chart on form #4
Comments
Nice....
I will try to ask a question on this topic, but there is little chance of an answer, because still no response to the previous one... -------------UPD------------- |
Just an FYI the preview installs on a separate hive and runs parallel to your production version, I understand your doing it will not fix the issue. |
Can you try to attach a second version of VS both to the primary instance of VS and to the DesignToolsServer and Debug into it to see what exactly happens? |
@KlausLoeffelmann I have VS attached to both of the processes and neither hit anything. Just this message pops up and if you hit OK nothing is changes in the Solution. If you open Form1 of https://github.com/paul1956/CareLink/tree/DataVisualizationDesigner in designer, no Charts show up in Preview 2 where I could mostly design in Preview 1. In Preview 1, if you got too deep the properties in Scrollbar for example below can't be click on or exited.
The big black space on the left and behind and 100% are white Charts and Form1.Designer.vb has the correct add.
|
@KlausLoeffelmann that helped public Assembly LoadFromAssemblyName(AssemblyName assemblyName)
{
if (assemblyName == null)
throw new ArgumentNullException(nameof(assemblyName));
// Attempt to load the assembly, using the same ordering as static load, in the current load context.
StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
return RuntimeAssembly.InternalLoad(assemblyName, ref stackMark, this);
} System.IO.FileNotFoundException
|
@KlausLoeffelmann this version also deleted everything related to DataVisualiztion including all handler clauses and everything in designer file if you do any edits to the Form the Control was dropped on. This was fixed for the last several releases. |
@KlausLoeffelmann do you know if this is fixed in Preview 3? |
I know too little about the approach. I recently posted a few links to resources to check for best practices. The most important one is the preliminary (still in the making) description of the SDK: KlausLoeffelmann/NetControlDesigners#9. |
@KlausLoeffelmann I can't answer those questions hopefully @kirsan31 can, I am just the user of the control. I do know that the Chart control worked in preview 1 (it appeared in toolbox, could be dropped on from, it displayed correctly and could be edited) and in Preview 2, existing charts don't display in designer and if anything changes on the form even unrelated to the Chart control everything about the chart is deleted from the design file except the Public Event declaration line. That seems like a major issue we have not seen since .Net 5 with Custom Controls. |
It's very basic port. Added sdk, corrected namespaces, replaced |
No. I debugged into that over the weekend, and it seems, the System.CodeDom assembly is loaded twice - once from the global installation, and once from the shadow cache. And then, on instantiation, the external Serializer uses the shadow cache one, while the Designer used the global one. Since their CodeBase is different, the types are considered different. We're still investigating, what broke to end up with this. (Also @Shyam-Gupta, @merriemcgaw FYI.) We don't seem to have that problem, when the server-part of a multi targeted Control Designer comes from a NuGet. But I have yet to confirm that, although I am pretty sure, since the examples and templates also use base classes of the CodeDom Serializer, and they never explode. That could be a workaround, and it would make sense to go down that route anyway, since the Type Editors must be used in the context of VS, anyway. |
@KlausLoeffelmann I think you are confusing this error with #5. You are talking about #5 bug and it's defiantly can be workaround by nuget (because it's 100% workaround by dll reference ). And here we are talking about:
that was appeared in 17.4 preview 2. Or is it something I don't understand? |
Hmm. |
No, #5 was always here from first port (it was V.S. 17.0). And it was only with project reference (with dll reference all good). Naturally, it also works through Nuget. And this (#4) is a new issue from 17.4 preview 2 only. And this is with dll reference - it basically can't load the dll (those. with a high degree of probability with nuget it will be the same).
I think with clean form the error will be the same... @paul1956 can you pls check it? ---------UPD--------- Yes with clean form the same error - can't even load dll. Overall, with 17.4 we can't use designer at all any more :( |
@paul1956 both errors above are clearly #5. When your drag control on new clean form the reference to the control will be added by project. But we need to test dll reference scenario. It's my bad I did not describe exactly what needs to be done - sorry :( See here: #4 (comment) |
If you mean
|
@paul1956 oh oh oh my bad again 🤦♂️🤦♂️🤦♂️ Yes they are both there and dll ref is commented out: winforms-datavisualization/DesignerTest/DesignerTest.csproj Lines 11 to 19 in 22e89b9
For test we need to remove / comment out proj ref and uncomment dll ref: <!--<ItemGroup>
<ProjectReference Include="..\src\System.Windows.Forms.DataVisualization\ChartWin.csproj" />
</ItemGroup>-->
<ItemGroup>
<Reference Include="System.Windows.Forms.DataVisualization">
<HintPath>..\src\System.Windows.Forms.DataVisualization\bin\Debug\net6.0-windows\System.Windows.Forms.DataVisualization.dll</HintPath>
</Reference>
</ItemGroup> So, open chartDesigner.mp4 |
/cc @paul1956 pls check my previous post 🙏 |
@kirsan31 same error.
|
/cc @KlausLoeffelmann In 17.4 we have #5 with proj reference (this bug exist in all VS versions), and #4 with dll reference (only 17.4 bug). |
We're investigating. It seems, the |
So...good news is, we are actively investigating. Not so good news is, it's not at all obvious right now why this is happening, but we're on it. It may take a while, though, so please stay tuned. It's planned to be addressed in 17.5, with a chance to be serviced in 17.4, depending on the extend and additional effects of the fix. @merriemcgaw FYI. |
Thank you @KlausLoeffelmann. Then we stay at 17.3 and hope for servicing in 17.4... |
Quick additional questions in that context: a) Can you have 17.3 and 17.4 on your test machine at the same time or does installing 17.4 also screwing up the scenario? b) Is the Target Framework relevant (or installing additional .NET versions like 7.0 on that machine)? Also @Shyam-Gupta for FYI to this. |
17.4 have released already, So I can't install it side by side with 17.3 :( Theoretically I can try with 17.5... |
I am running the preview released yesterday. But it broke ModVb so I might revert. What is the exact request? |
Can you answer on @KlausLoeffelmann questions above? |
I think you can only have 1 release version and 1 preview version. |
@paul1956 I'll try to rephrase the question: after you installed 17.4 preview2 (in which the designer didn't work), did the designer still work in 17.3? |
You don't think you can have the 2 full releases installed at the same time. I used GitHub to roll back and then stopped using designer. |
On September 17 (when you post this issue) and then until 17.4 released - does designer worked in 17.3? |
You can have as many VS versions as you want. They all run in parallel just fine, you just need to give them different folder names. Well, except if they don't, which shouldn't be happening. Hence my original question. 😄 |
@KlausLoeffelmann Only
So on your questions regards #4 (because #5 is stably present everywhere):
Installing additional .NET versions and/or change Target Framework doesn't break Most interesting part is that on this machine, after installing Lines 61 to 63 in 6f35dcc
doesn't solve #5 any more 🙄 as I described here (bottom of the post). Unfortunately I doesn't test this before |
OK, that's helpful - thanks! |
Fixed in V.S. 17.4.3. |
The text was updated successfully, but these errors were encountered: