An error occurred when merging assemblies,VS 2017 web deploy RRS feed

  • Question

  • Hello

    I am using visual studio 2017 to build and publish my website.

    I bought a new laptop and moved my website code to it and installed visual studio.On the new laptop when i publish using web deploy and merge output into one assembly I am getting this error on preview

    An error occurred when merging assemblies: Object reference not set to an instance of an object.

    Nothing have changed in my code.It publishes successfully on old laptop using same visual studio.

    I tried to create a new website and tried to do the publish I noticed that I get the error once i add .vb class or .aspx.vb file to the website.Build is successful

    These are the solution i found online and i tried but with no luck:

    - disabled antivirus,McAfee firewall,windows defender firewall.

    - removed dlls under Bin folder

    - running visual studio as administrator

    - uninstalled  and reinstalled visual studio again


    Monday, June 3, 2019 6:27 AM


  • Hi Mahagh,

    Welcome to MSDN forum.

    According to your description, we suggest you could follow the steps below:

    #1 Tools>Input and Export settings to export the VSsettings from old laptop and input it into visual studio in new laptop.

    #2 Open visual studio installer in the old and new laptop, then check if all individual packages install completely

    #3 install the .NET core 2.2: 

    Any feedback will be expected.

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    • Marked as answer by Mahagh Wednesday, June 12, 2019 6:36 AM
    Monday, June 3, 2019 9:16 AM