Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Visual Studio Weirdness

Visual Studio Weirdness

Scheduled Pinned Locked Moved C#
csharpc++visual-studiohelpquestion
3 Posts 2 Posters 50 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Richard Andrew x64R Offline
    Richard Andrew x64R Offline
    Richard Andrew x64
    wrote on last edited by
    #1

    I have a dot net 8.0 C# DLL project that holds a reference to a C++ .net 8.0 mixed mode DLL project. Whenever the mixed mode project is rebuilt, then none of the projects that depend upon it will load the previous build of the mixed mode DLL. It gives a library version not found error if I try to run the previous build. This is annoying because this happens whenever the mixed mode DLL is rebuilt, even if there are zero code changes in that project. Just where do you think Visual Studio is managing this auto-incrementing build number that is disrupting my development feng shui? When I open the Properties dialog for the mixed mode DLL, I can't find anything that looks like it implements an auto-incrementing build number. Remember, this would be the Properties window that is presented for native projects, not dot net projects.

    The difficult we do right away... ...the impossible takes slightly longer.

    J 1 Reply Last reply
    0
    • Richard Andrew x64R Richard Andrew x64

      I have a dot net 8.0 C# DLL project that holds a reference to a C++ .net 8.0 mixed mode DLL project. Whenever the mixed mode project is rebuilt, then none of the projects that depend upon it will load the previous build of the mixed mode DLL. It gives a library version not found error if I try to run the previous build. This is annoying because this happens whenever the mixed mode DLL is rebuilt, even if there are zero code changes in that project. Just where do you think Visual Studio is managing this auto-incrementing build number that is disrupting my development feng shui? When I open the Properties dialog for the mixed mode DLL, I can't find anything that looks like it implements an auto-incrementing build number. Remember, this would be the Properties window that is presented for native projects, not dot net projects.

      The difficult we do right away... ...the impossible takes slightly longer.

      J Offline
      J Offline
      jschell
      wrote on last edited by
      #2

      If I understand the question correctly it is not a 'version number' A dll has a header that describes the contents. That includes things like a version number but it also includes the code type which is something like '32bit', '64bit' and 'any'. There are other thinks in there like the full name, encryption info, etc. I think the following page discusses some of this. PE Format - Win32 apps | Microsoft Learn[^]

      Richard Andrew x64R 1 Reply Last reply
      0
      • J jschell

        If I understand the question correctly it is not a 'version number' A dll has a header that describes the contents. That includes things like a version number but it also includes the code type which is something like '32bit', '64bit' and 'any'. There are other thinks in there like the full name, encryption info, etc. I think the following page discusses some of this. PE Format - Win32 apps | Microsoft Learn[^]

        Richard Andrew x64R Offline
        Richard Andrew x64R Offline
        Richard Andrew x64
        wrote on last edited by
        #3

        Yes, but it would refuse to load the DLL even if there were no code changes or assembly property changes. I think I have solved it however. There is a file in the DLL project named AssemblyInfo.cpp, and it contains an assembly attribute named AssemblyVersionAttribute. And it was set to L"1.0.*". I think this was causing the problem. The asterisk means that it should autoincrement the version number. I changed the value to L"1.0.0" and it no longer fails to load the DLL if the DLL is rebuilt. Thanks for reading my post and for your input!

        The difficult we do right away... ...the impossible takes slightly longer.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups