Can't isolate msstdfmt.dll
-
domingo, 18 de março de 2012 23:32
It's probably very simple, but I don't seem to be able to isolate this dll. I'm using ClickOnce to deploy a VB 6.0 project (about 20K LOC). It deploys fine to Windows 7. It deploys fine to windows XP if I manually register msstdfmt.dll. If i don't it errors.
If I unregister this .dll on my development system, I get the same error as when I try to deploy it to XP, "Class not registered...."
The references list in my .net (VS 2010) solution contains the reference. I can set it's isolated property to true, but my application deploys correctly but doesn't run on the destination machine (or my dev machine for that matter) if I unregister the dll. This means to me that Reg-free COM is not working.
It doesn't seem to matter if interop is true or false or if copy local is true or false.
I've tried copying the .dll into my list of files but that doesn't seem to work either.
My VB Project also has a valid reference to this dll. Any suggestions are appreciated.
-terry
-terry
Todas as Respostas
-
quarta-feira, 21 de março de 2012 07:07ModeradorHi tharmer,
Do you mean if you not register sstdfmt.dll on your development machine, the application installed on the target machine will not works?
According to MSDN, the Isolated property requires that the COM component be registered on the developer's machine in order to auto-generate the manifest during the build. For more details, see http://msdn.microsoft.com/en-us/library/ms165432(v=vs.100).aspx
If I misunderstood you, please kindly elaborate your question.
Best Regards,Bob Wu [MSFT]
MSDN Community Support | Feedback to us
-
quarta-feira, 21 de março de 2012 16:48
Thanks for the reply, Bob. No, it's just the standard test to confirm that ClickOnce is successfully isolating msstdfmt.dll.
Register msstdfmt.dll on dev machine.
Deploy ClickOnce app to dev machine
App runs fine.
Unregister msstdfmt.dll on dev machine
Deploy ClickOnce app to dev machine
App no longer runs, complaining about missing msstdfmt.dll
Therefore trying to isolate msstdfmt.dll in ClickOnce deployment hasn't worked.
-terry
-
quinta-feira, 22 de março de 2012 09:04Moderador
Hi terry,
I have a silly question. Did you change the value of the Isolated property from False to True in the Properties window?
I add this com component in a C# project and it works when I unregister the com component. The following is the details.
First, I create a c# project in the Visual Studio and add msstdfmt.dll as a reference (by default, it is registered).
Second, I add the following code to create a StdDataFormat object.public Form1() { InitializeComponent(); StdDataFormat f = new StdDataFormat(); string s = f.ToString(); this.richTextBox1.Text += s; }
Third, I open the dll’s properties windows and change the value of the Isolated property from False to True
Fourth, I build and publish the project.
Fifth, I install the clickonce application and run it as expected.
Sixth, I Unregister msstdfmt.dll by calling regsvr32 /u msstdfmt.dll and run the application again. It works.
If I pass the third step, I found I’m not able to run the application after Unregister the dll.
Finally, both the manifest and msstdfmt.dll are created in output folder and the msstdfmt.dll is included in the Application Files. Everything works as expected.Would you mind following these steps and check it again?
In addition, there are two ways that ClickOnce deploys COM components:
Use the bootstrapper to deploy your COM components; this works on all supported platforms.
Use native component isolation (also known as registration-free COM) deployment. However, this will only work on a Windows XP or higher operating system.
If registration-free doesn’t works in your case, you can still build and publish applications that depend on them through the standard registration scheme using the Bootstrapper. For more information, see Creating Bootstrapper Packages.(From http://msdn.microsoft.com/en-us/library/ms165432(v=vs.100).aspx)
Anyway, please let me know the result.
Best Regards,
Bob Wu [MSFT]
MSDN Community Support | Feedback to us
- Marcado como Resposta Bob Wu-MTMicrosoft Contingent Staff, Moderator terça-feira, 3 de abril de 2012 03:11
- Não Marcado como Resposta Bob Wu-MTMicrosoft Contingent Staff, Moderator sexta-feira, 13 de abril de 2012 01:47
-
quinta-feira, 22 de março de 2012 20:33
Thank you very much for your reply. I understand what you're doing. Clever. I'll try it this pm and let ou know the results.
-t
-terry
-
sábado, 24 de março de 2012 18:32
After several days of compiler issues, I'm back. I am writing this is vb.net and can't seem to get your C# code ported. This is what I have:
Imports System.IO
Imports System
Imports StdDataFormatPublic Class Form1
Public Sub New()
InitializeComponent()
Dim f As New StdDataFormat()
f = New StdDataFormat()
Dim s As String = "A"
s = s + f.ToString
End Sub
End Class
Some errors:
StdDataFormat is not defined
Namespace....StdFormat...doesn't contain and public membor or cannot be found
Etc.
Sorry for the inexperience.
-terry
-terry
-
segunda-feira, 26 de março de 2012 09:24Moderador
Hi tharmer,
You should add the reference, please follow the steps below.
Click add reference, click COM tab, select Microsoft Data Formatting Object Library 6.0 and then click ok.Bes tRegarsd,
Bob Wu [MSFT]
MSDN Community Support | Feedback to us
- Editado Bob Wu-MTMicrosoft Contingent Staff, Moderator segunda-feira, 26 de março de 2012 09:27 add a picture
-
quarta-feira, 11 de abril de 2012 02:36
Well, I got that far, but when I "Isolate" the reference, ClickOnce refuses to deploy, claiming that "the program is improperly formatted."
-terry
PS if I remove the attempt to isolate, then ClickOnce deploys correctly, but this message reappears:
Class not registered. You need the following file to be installed on your machine.
MSSTDFMT.DLL
- Editado tharmer quarta-feira, 11 de abril de 2012 02:38
-
quinta-feira, 12 de abril de 2012 07:26Moderador
Hi tharmer,
Is it written by C#,VB.net or Vb6?
Could you please post the details of the error message?
Best Regards,Bob Wu [MSFT]
MSDN Community Support | Feedback to us
- Marcado como Resposta tharmer sábado, 14 de julho de 2012 17:43

