Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

C# Compiling C# .NET ImGui problems..(warnings)

LandoKane

New Coder
I know its debug code but here it goes ... hope that's okay, can anyone help me figure out how to fix this issue?

C#:
1>------ Build started: Project: CS2trialCsharp, Configuration: Release x64 ------
1>Skipping analyzers to speed up the build. You can execute 'Build' or 'Rebuild' command to run analyzers.
1>C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\Program.cs(38,23,38,31): warning CS0169: The field 'Program.drawList' is never used
1>C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\Program.cs(65,14,65,30): warning CS0414: The field 'Program.enableEnemeyLine' is assigned but its value is never used
1>C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\Program.cs(67,14,67,29): warning CS0414: The field 'Program.enablePlayerDot' is assigned but its value is never used
1>C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\Program.cs(69,14,69,33): warning CS0414: The field 'Program.enableEnemyDistance' is assigned but its value is never used
1>C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\Program.cs(71,14,71,28): warning CS0414: The field 'Program.enableTeamLine' is assigned but its value is never used
1>C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\Program.cs(75,14,75,32): warning CS0414: The field 'Program.enableTeamDistance' is assigned but its value is never used
1>CS2trialCsharp -> C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\bin\x64\Release\net7.0\CS2trialCsharp.dll
1>Done building project "CS2trialCsharp.csproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
 
I know its debug code but here it goes ... hope that's okay, can anyone help me figure out how to fix this issue?

C#:
1>------ Build started: Project: CS2trialCsharp, Configuration: Release x64 ------
1>Skipping analyzers to speed up the build. You can execute 'Build' or 'Rebuild' command to run analyzers.
1>C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\Program.cs(38,23,38,31): warning CS0169: The field 'Program.drawList' is never used
1>C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\Program.cs(65,14,65,30): warning CS0414: The field 'Program.enableEnemeyLine' is assigned but its value is never used
1>C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\Program.cs(67,14,67,29): warning CS0414: The field 'Program.enablePlayerDot' is assigned but its value is never used
1>C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\Program.cs(69,14,69,33): warning CS0414: The field 'Program.enableEnemyDistance' is assigned but its value is never used
1>C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\Program.cs(71,14,71,28): warning CS0414: The field 'Program.enableTeamLine' is assigned but its value is never used
1>C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\Program.cs(75,14,75,32): warning CS0414: The field 'Program.enableTeamDistance' is assigned but its value is never used
1>CS2trialCsharp -> C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\bin\x64\Release\net7.0\CS2trialCsharp.dll
1>Done building project "CS2trialCsharp.csproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Hi there,
What is the ACTUAL issue you are running into? According to the log there, your project built just fine, hence the succeeded: 1, failed: 0..

As far as the warnings go, they tell you that those variables are not being used... meaning you declared them, and maybe instantiated/assigned value to them,but you don't do anything with them
 
Thanks for the reply. It says that but the truth is that the console app didn't run at all and do what it's supposed too.. I know in C++ I can #pragma warning #### and bypass said warning or use a setting to skip said warning completely. With C# I am wondering how to do the same.

Regards,
Lando
 
Thanks for the reply. It says that but the truth is that the console app didn't run at all and do what it's supposed too.. I know in C++ I can #pragma warning #### and bypass said warning or use a setting to skip said warning completely. With C# I am wondering how to do the same.

Regards,
Lando
lol, trust me, there was something done, but no output. Can you post your code so we can debug further? I have a funny feeling you're not really using your variables 🙂
 
looks like it shits the bed at EndTabItem()... said unused func or variable is part of ImGui NuPackage and clickable transparency so its not really something edit out.. Or can I? or should I?



Code:
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Repeat 2 times:
--------------------------------
   at ImGuiNET.ImGuiNative.igEndTabItem()
--------------------------------
   at ImGuiNET.ImGui.EndTabItem()
   at CS2MULTI.Program.DrawMenu()
   at CS2MULTI.Program.Render()
   at ClickableTransparentOverlay.Overlay.<RunInfiniteLoop>b__47_0()
   at ClickableTransparentOverlay.ImGuiRenderer.Update(Single, System.Action)
   at ClickableTransparentOverlay.Overlay.RunInfiniteLoop(System.Threading.CancellationToken)
   at ClickableTransparentOverlay.Overlay+<<Start>b__26_0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[ClickableTransparentOverlay.Overlay+<<Start>b__26_0>d, ClickableTransparentOverlay, Version=6.2.1.0, Culture=neutral, PublicKeyToken=null]](<<Start>b__26_0>d ByRef)
   at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[[ClickableTransparentOverlay.Overlay+<<Start>b__26_0>d, ClickableTransparentOverlay, Version=6.2.1.0, Culture=neutral, PublicKeyToken=null]](<<Start>b__26_0>d ByRef)
   at ClickableTransparentOverlay.Overlay.<Start>b__26_0()

C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\bin\x64\Release\net7.0\CS2trialCsharp.exe (process 15484) exited with code -1073741819.
 
looks like it shits the bed at EndTabItem()... said unused func or variable is part of ImGui NuPackage and clickable transparency so its not really something edit out.. Or can I? or should I?



Code:
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Repeat 2 times:
--------------------------------
   at ImGuiNET.ImGuiNative.igEndTabItem()
--------------------------------
   at ImGuiNET.ImGui.EndTabItem()
   at CS2MULTI.Program.DrawMenu()
   at CS2MULTI.Program.Render()
   at ClickableTransparentOverlay.Overlay.<RunInfiniteLoop>b__47_0()
   at ClickableTransparentOverlay.ImGuiRenderer.Update(Single, System.Action)
   at ClickableTransparentOverlay.Overlay.RunInfiniteLoop(System.Threading.CancellationToken)
   at ClickableTransparentOverlay.Overlay+<<Start>b__26_0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[ClickableTransparentOverlay.Overlay+<<Start>b__26_0>d, ClickableTransparentOverlay, Version=6.2.1.0, Culture=neutral, PublicKeyToken=null]](<<Start>b__26_0>d ByRef)
   at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[[ClickableTransparentOverlay.Overlay+<<Start>b__26_0>d, ClickableTransparentOverlay, Version=6.2.1.0, Culture=neutral, PublicKeyToken=null]](<<Start>b__26_0>d ByRef)
   at ClickableTransparentOverlay.Overlay.<Start>b__26_0()

C:\Users\lando\source\repos\CS2trialCsharp\CS2trialCsharp\bin\x64\Release\net7.0\CS2trialCsharp.exe (process 15484) exited with code -1073741819.
if it's not being used, try commenting it out and see what happens
 
Back
Top Bottom