You are here: Office-Outlook.com  / Outlook Forum

.NET AddIn - Version 1.1 and 2

Home » Outlook addins and plugins development » Developer Outlook add-ins
.NET AddIn - Version 1.1 and 2 [message #425818] Mon, 06 October 2008 05:58 Go to next message
KeithM
Messages: 40
Registered: July 2006
Member
Hi,
I have an office add-in written in C sharp and compiled against .NET v1.1

If I install this addin to a machine running .NET frameworks 1.1 and 2.0,
which framework will my add in run against?

http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 implies that it
will run agianst the latest?

Is there any code I can put in my addin to test and find out which framework
version the code is running against?

This is important because my code is part of a secure system and if it is
now running against .NET 2.0 (installed by another app) then we may have to
redo a large part of our testing.

Thanks.
Re: .NET AddIn - Version 1.1 and 2 [message #426361] Wed, 08 October 2008 00:50 Go to previous message
KeithM
Messages: 40
Registered: July 2006
Member
Ah brilliant.
Thanks for that useful information Jialiang

"Jialiang Ge [MSFT]" <jialge@online.microsoft.com> wrote in message
news:uXO%23oOGKJHA.5232@TK2MSFTNGP05.phx.gbl...
>
Re: .NET AddIn - Version 1.1 and 2 [message #430584] Wed, 08 October 2008 00:50 Go to previous message
KeithM
Messages: 40
Registered: July 2006
Member
Ah brilliant.
Thanks for that useful information Jialiang

"Jialiang Ge [MSFT]" <jialge@online.microsoft.com> wrote in message
news:uXO%23oOGKJHA.5232@TK2MSFTNGP05.phx.gbl...
>
Re: .NET AddIn - Version 1.1 and 2 [message #456372] Tue, 07 October 2008 03:01 Go to previous message
jialge
Messages: 1201
Registered: July 2007
Senior Member
Good morning KeithM, nice to see you again.

For Office Add-in components that run in a computer installed with both .NET
runtime 1.1 and 2.0, the addins load with 2.0 unless the process is
configured to run against 1.1. This point is documented at
http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 as you may have
already noticed. In order to find out which framework version the code is
running against at runtime, may I suggest the following two solutions:

Solution 1. Check the runtime version in code.

The function:
System.Runtime.InteropServices.RuntimeEnvironment.GetSystemV ersion() can
tell us the runtime version.
http://msdn.microsoft.com/en-us/library/system.runtime.inter opservices.runtimeenvironment.getsystemversion.aspx
So we can call it in the Addin solution and see if the runtime meets our
requirement.

Solution 2. Check the runtime version with the tool: Process Explorer.

Process explorer can be downloaded at
http://technet.microsoft.com/en-us/sysinternals/bb896653.asp x. We can use
the tool to view the DLLs loaded by a certain process, say Office process.
Because .NET 1.1 runtime loads 1.1 version of mscrowks.dll, and .NET 2.0
runtime's mscorwks.dll is 2.0, we can determine the current runtime
according to this version number. The detailed step list is:
1. start the Office application that loads our add-in
2. start process explorer
3. In the View menu of process explorer, select Lower Pane View -> DLLs.
4. In the Process list of process explorer, find the office process and view
its DLL list in the low pane.
5. find mscorwks.dll and look at its version.

Please try the above two solutions and let me know whether they are helpful
to you.

In addition, I'd like to share some other relevant materials with you that
might be useful:

1. How to configure Office application to run against .NET 1.1 runtime.
We can add a config file to the Office exe. Take winword as an example:
create a file named 'winword.exe.config' with the following content, and
place the file together with winword.exe.

<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
<supportedRuntime version="v1.0.3705" />
</startup>
</configuration>
For more readings, please refer to the article:
http://msdn.microsoft.com/en-us/library/ms994410.aspx

2. What is the potential problems if we configure Office application to run
against .NET 1.1 runtime?
The potential problem is that, all the existing Office add-ins that rely on
..NET 2.0 runtime are very likely to crash (fail to be loaded) after we add
this config file.

By the way, I will not be available in the next three days due to a
training. My colleague will continue supporting you if you have any
follow-up questions.

Have a very nice day!

Regards,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx# notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assi stance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


"KeithM" <KeithM@newsgroups.nospam> wrote in message
news:48ea072d$1_1@glkas0286.greenlnk.net...
> Hi,
> I have an office add-in written in C sharp and compiled against .NET v1.1
>
> If I install this addin to a machine running .NET frameworks 1.1 and 2.0,
> which framework will my add in run against?
>
> http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 implies that
> it will run agianst the latest?
>
> Is there any code I can put in my addin to test and find out which
> framework version the code is running against?
>
> This is important because my code is part of a secure system and if it is
> now running against .NET 2.0 (installed by another app) then we may have
> to redo a large part of our testing.
>
> Thanks.
>
>
Re: .NET AddIn - Version 1.1 and 2 [message #456379] Wed, 08 October 2008 00:50 Go to previous message
KeithM
Messages: 40
Registered: July 2006
Member
Ah brilliant.
Thanks for that useful information Jialiang

"Jialiang Ge [MSFT]" <jialge@online.microsoft.com> wrote in message
news:uXO%23oOGKJHA.5232@TK2MSFTNGP05.phx.gbl...
>
Re: .NET AddIn - Version 1.1 and 2 [message #457318] Tue, 07 October 2008 03:01 Go to previous message
jialge
Messages: 1201
Registered: July 2007
Senior Member
Good morning KeithM, nice to see you again.

For Office Add-in components that run in a computer installed with both .NET
runtime 1.1 and 2.0, the addins load with 2.0 unless the process is
configured to run against 1.1. This point is documented at
http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 as you may have
already noticed. In order to find out which framework version the code is
running against at runtime, may I suggest the following two solutions:

Solution 1. Check the runtime version in code.

The function:
System.Runtime.InteropServices.RuntimeEnvironment.GetSystemV ersion() can
tell us the runtime version.
http://msdn.microsoft.com/en-us/library/system.runtime.inter opservices.runtimeenvironment.getsystemversion.aspx
So we can call it in the Addin solution and see if the runtime meets our
requirement.

Solution 2. Check the runtime version with the tool: Process Explorer.

Process explorer can be downloaded at
http://technet.microsoft.com/en-us/sysinternals/bb896653.asp x. We can use
the tool to view the DLLs loaded by a certain process, say Office process.
Because .NET 1.1 runtime loads 1.1 version of mscrowks.dll, and .NET 2.0
runtime's mscorwks.dll is 2.0, we can determine the current runtime
according to this version number. The detailed step list is:
1. start the Office application that loads our add-in
2. start process explorer
3. In the View menu of process explorer, select Lower Pane View -> DLLs.
4. In the Process list of process explorer, find the office process and view
its DLL list in the low pane.
5. find mscorwks.dll and look at its version.

Please try the above two solutions and let me know whether they are helpful
to you.

In addition, I'd like to share some other relevant materials with you that
might be useful:

1. How to configure Office application to run against .NET 1.1 runtime.
We can add a config file to the Office exe. Take winword as an example:
create a file named 'winword.exe.config' with the following content, and
place the file together with winword.exe.

<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
<supportedRuntime version="v1.0.3705" />
</startup>
</configuration>
For more readings, please refer to the article:
http://msdn.microsoft.com/en-us/library/ms994410.aspx

2. What is the potential problems if we configure Office application to run
against .NET 1.1 runtime?
The potential problem is that, all the existing Office add-ins that rely on
..NET 2.0 runtime are very likely to crash (fail to be loaded) after we add
this config file.

By the way, I will not be available in the next three days due to a
training. My colleague will continue supporting you if you have any
follow-up questions.

Have a very nice day!

Regards,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx# notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assi stance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


"KeithM" <KeithM@newsgroups.nospam> wrote in message
news:48ea072d$1_1@glkas0286.greenlnk.net...
> Hi,
> I have an office add-in written in C sharp and compiled against .NET v1.1
>
> If I install this addin to a machine running .NET frameworks 1.1 and 2.0,
> which framework will my add in run against?
>
> http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 implies that
> it will run agianst the latest?
>
> Is there any code I can put in my addin to test and find out which
> framework version the code is running against?
>
> This is important because my code is part of a secure system and if it is
> now running against .NET 2.0 (installed by another app) then we may have
> to redo a large part of our testing.
>
> Thanks.
>
>
Re: .NET AddIn - Version 1.1 and 2 [message #457325] Wed, 08 October 2008 00:50 Go to previous message
KeithM
Messages: 40
Registered: July 2006
Member
Ah brilliant.
Thanks for that useful information Jialiang

"Jialiang Ge [MSFT]" <jialge@online.microsoft.com> wrote in message
news:uXO%23oOGKJHA.5232@TK2MSFTNGP05.phx.gbl...
>
Re: .NET AddIn - Version 1.1 and 2 [message #458950] Tue, 07 October 2008 03:01 Go to previous message
jialge
Messages: 1201
Registered: July 2007
Senior Member
Good morning KeithM, nice to see you again.

For Office Add-in components that run in a computer installed with both .NET
runtime 1.1 and 2.0, the addins load with 2.0 unless the process is
configured to run against 1.1. This point is documented at
http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 as you may have
already noticed. In order to find out which framework version the code is
running against at runtime, may I suggest the following two solutions:

Solution 1. Check the runtime version in code.

The function:
System.Runtime.InteropServices.RuntimeEnvironment.GetSystemV ersion() can
tell us the runtime version.
http://msdn.microsoft.com/en-us/library/system.runtime.inter opservices.runtimeenvironment.getsystemversion.aspx
So we can call it in the Addin solution and see if the runtime meets our
requirement.

Solution 2. Check the runtime version with the tool: Process Explorer.

Process explorer can be downloaded at
http://technet.microsoft.com/en-us/sysinternals/bb896653.asp x. We can use
the tool to view the DLLs loaded by a certain process, say Office process.
Because .NET 1.1 runtime loads 1.1 version of mscrowks.dll, and .NET 2.0
runtime's mscorwks.dll is 2.0, we can determine the current runtime
according to this version number. The detailed step list is:
1. start the Office application that loads our add-in
2. start process explorer
3. In the View menu of process explorer, select Lower Pane View -> DLLs.
4. In the Process list of process explorer, find the office process and view
its DLL list in the low pane.
5. find mscorwks.dll and look at its version.

Please try the above two solutions and let me know whether they are helpful
to you.

In addition, I'd like to share some other relevant materials with you that
might be useful:

1. How to configure Office application to run against .NET 1.1 runtime.
We can add a config file to the Office exe. Take winword as an example:
create a file named 'winword.exe.config' with the following content, and
place the file together with winword.exe.

<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
<supportedRuntime version="v1.0.3705" />
</startup>
</configuration>
For more readings, please refer to the article:
http://msdn.microsoft.com/en-us/library/ms994410.aspx

2. What is the potential problems if we configure Office application to run
against .NET 1.1 runtime?
The potential problem is that, all the existing Office add-ins that rely on
..NET 2.0 runtime are very likely to crash (fail to be loaded) after we add
this config file.

By the way, I will not be available in the next three days due to a
training. My colleague will continue supporting you if you have any
follow-up questions.

Have a very nice day!

Regards,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx# notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assi stance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


"KeithM" <KeithM@newsgroups.nospam> wrote in message
news:48ea072d$1_1@glkas0286.greenlnk.net...
> Hi,
> I have an office add-in written in C sharp and compiled against .NET v1.1
>
> If I install this addin to a machine running .NET frameworks 1.1 and 2.0,
> which framework will my add in run against?
>
> http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 implies that
> it will run agianst the latest?
>
> Is there any code I can put in my addin to test and find out which
> framework version the code is running against?
>
> This is important because my code is part of a secure system and if it is
> now running against .NET 2.0 (installed by another app) then we may have
> to redo a large part of our testing.
>
> Thanks.
>
>
Re: .NET AddIn - Version 1.1 and 2 [message #458957] Wed, 08 October 2008 00:50 Go to previous message
KeithM
Messages: 40
Registered: July 2006
Member
Ah brilliant.
Thanks for that useful information Jialiang

"Jialiang Ge [MSFT]" <jialge@online.microsoft.com> wrote in message
news:uXO%23oOGKJHA.5232@TK2MSFTNGP05.phx.gbl...
>
Re: .NET AddIn - Version 1.1 and 2 [message #459407] Tue, 07 October 2008 03:01 Go to previous message
jialge
Messages: 1201
Registered: July 2007
Senior Member
Good morning KeithM, nice to see you again.

For Office Add-in components that run in a computer installed with both .NET
runtime 1.1 and 2.0, the addins load with 2.0 unless the process is
configured to run against 1.1. This point is documented at
http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 as you may have
already noticed. In order to find out which framework version the code is
running against at runtime, may I suggest the following two solutions:

Solution 1. Check the runtime version in code.

The function:
System.Runtime.InteropServices.RuntimeEnvironment.GetSystemV ersion() can
tell us the runtime version.
http://msdn.microsoft.com/en-us/library/system.runtime.inter opservices.runtimeenvironment.getsystemversion.aspx
So we can call it in the Addin solution and see if the runtime meets our
requirement.

Solution 2. Check the runtime version with the tool: Process Explorer.

Process explorer can be downloaded at
http://technet.microsoft.com/en-us/sysinternals/bb896653.asp x. We can use
the tool to view the DLLs loaded by a certain process, say Office process.
Because .NET 1.1 runtime loads 1.1 version of mscrowks.dll, and .NET 2.0
runtime's mscorwks.dll is 2.0, we can determine the current runtime
according to this version number. The detailed step list is:
1. start the Office application that loads our add-in
2. start process explorer
3. In the View menu of process explorer, select Lower Pane View -> DLLs.
4. In the Process list of process explorer, find the office process and view
its DLL list in the low pane.
5. find mscorwks.dll and look at its version.

Please try the above two solutions and let me know whether they are helpful
to you.

In addition, I'd like to share some other relevant materials with you that
might be useful:

1. How to configure Office application to run against .NET 1.1 runtime.
We can add a config file to the Office exe. Take winword as an example:
create a file named 'winword.exe.config' with the following content, and
place the file together with winword.exe.

<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
<supportedRuntime version="v1.0.3705" />
</startup>
</configuration>
For more readings, please refer to the article:
http://msdn.microsoft.com/en-us/library/ms994410.aspx

2. What is the potential problems if we configure Office application to run
against .NET 1.1 runtime?
The potential problem is that, all the existing Office add-ins that rely on
..NET 2.0 runtime are very likely to crash (fail to be loaded) after we add
this config file.

By the way, I will not be available in the next three days due to a
training. My colleague will continue supporting you if you have any
follow-up questions.

Have a very nice day!

Regards,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx# notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assi stance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


"KeithM" <KeithM@newsgroups.nospam> wrote in message
news:48ea072d$1_1@glkas0286.greenlnk.net...
> Hi,
> I have an office add-in written in C sharp and compiled against .NET v1.1
>
> If I install this addin to a machine running .NET frameworks 1.1 and 2.0,
> which framework will my add in run against?
>
> http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 implies that
> it will run agianst the latest?
>
> Is there any code I can put in my addin to test and find out which
> framework version the code is running against?
>
> This is important because my code is part of a secure system and if it is
> now running against .NET 2.0 (installed by another app) then we may have
> to redo a large part of our testing.
>
> Thanks.
>
>
Re: .NET AddIn - Version 1.1 and 2 [message #459414] Wed, 08 October 2008 00:50 Go to previous message
KeithM
Messages: 40
Registered: July 2006
Member
Ah brilliant.
Thanks for that useful information Jialiang

"Jialiang Ge [MSFT]" <jialge@online.microsoft.com> wrote in message
news:uXO%23oOGKJHA.5232@TK2MSFTNGP05.phx.gbl...
>
Re: .NET AddIn - Version 1.1 and 2 [message #460420] Tue, 07 October 2008 03:01 Go to previous message
jialge
Messages: 1201
Registered: July 2007
Senior Member
Good morning KeithM, nice to see you again.

For Office Add-in components that run in a computer installed with both .NET
runtime 1.1 and 2.0, the addins load with 2.0 unless the process is
configured to run against 1.1. This point is documented at
http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 as you may have
already noticed. In order to find out which framework version the code is
running against at runtime, may I suggest the following two solutions:

Solution 1. Check the runtime version in code.

The function:
System.Runtime.InteropServices.RuntimeEnvironment.GetSystemV ersion() can
tell us the runtime version.
http://msdn.microsoft.com/en-us/library/system.runtime.inter opservices.runtimeenvironment.getsystemversion.aspx
So we can call it in the Addin solution and see if the runtime meets our
requirement.

Solution 2. Check the runtime version with the tool: Process Explorer.

Process explorer can be downloaded at
http://technet.microsoft.com/en-us/sysinternals/bb896653.asp x. We can use
the tool to view the DLLs loaded by a certain process, say Office process.
Because .NET 1.1 runtime loads 1.1 version of mscrowks.dll, and .NET 2.0
runtime's mscorwks.dll is 2.0, we can determine the current runtime
according to this version number. The detailed step list is:
1. start the Office application that loads our add-in
2. start process explorer
3. In the View menu of process explorer, select Lower Pane View -> DLLs.
4. In the Process list of process explorer, find the office process and view
its DLL list in the low pane.
5. find mscorwks.dll and look at its version.

Please try the above two solutions and let me know whether they are helpful
to you.

In addition, I'd like to share some other relevant materials with you that
might be useful:

1. How to configure Office application to run against .NET 1.1 runtime.
We can add a config file to the Office exe. Take winword as an example:
create a file named 'winword.exe.config' with the following content, and
place the file together with winword.exe.

<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
<supportedRuntime version="v1.0.3705" />
</startup>
</configuration>
For more readings, please refer to the article:
http://msdn.microsoft.com/en-us/library/ms994410.aspx

2. What is the potential problems if we configure Office application to run
against .NET 1.1 runtime?
The potential problem is that, all the existing Office add-ins that rely on
..NET 2.0 runtime are very likely to crash (fail to be loaded) after we add
this config file.

By the way, I will not be available in the next three days due to a
training. My colleague will continue supporting you if you have any
follow-up questions.

Have a very nice day!

Regards,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx# notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assi stance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


"KeithM" <KeithM@newsgroups.nospam> wrote in message
news:48ea072d$1_1@glkas0286.greenlnk.net...
> Hi,
> I have an office add-in written in C sharp and compiled against .NET v1.1
>
> If I install this addin to a machine running .NET frameworks 1.1 and 2.0,
> which framework will my add in run against?
>
> http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 implies that
> it will run agianst the latest?
>
> Is there any code I can put in my addin to test and find out which
> framework version the code is running against?
>
> This is important because my code is part of a secure system and if it is
> now running against .NET 2.0 (installed by another app) then we may have
> to redo a large part of our testing.
>
> Thanks.
>
>
Re: .NET AddIn - Version 1.1 and 2 [message #460427] Wed, 08 October 2008 00:50 Go to previous message
KeithM
Messages: 40
Registered: July 2006
Member
Ah brilliant.
Thanks for that useful information Jialiang

"Jialiang Ge [MSFT]" <jialge@online.microsoft.com> wrote in message
news:uXO%23oOGKJHA.5232@TK2MSFTNGP05.phx.gbl...
>
Re: .NET AddIn - Version 1.1 and 2 [message #461421] Tue, 07 October 2008 03:01 Go to previous message
jialge
Messages: 1201
Registered: July 2007
Senior Member
Good morning KeithM, nice to see you again.

For Office Add-in components that run in a computer installed with both .NET
runtime 1.1 and 2.0, the addins load with 2.0 unless the process is
configured to run against 1.1. This point is documented at
http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 as you may have
already noticed. In order to find out which framework version the code is
running against at runtime, may I suggest the following two solutions:

Solution 1. Check the runtime version in code.

The function:
System.Runtime.InteropServices.RuntimeEnvironment.GetSystemV ersion() can
tell us the runtime version.
http://msdn.microsoft.com/en-us/library/system.runtime.inter opservices.runtimeenvironment.getsystemversion.aspx
So we can call it in the Addin solution and see if the runtime meets our
requirement.

Solution 2. Check the runtime version with the tool: Process Explorer.

Process explorer can be downloaded at
http://technet.microsoft.com/en-us/sysinternals/bb896653.asp x. We can use
the tool to view the DLLs loaded by a certain process, say Office process.
Because .NET 1.1 runtime loads 1.1 version of mscrowks.dll, and .NET 2.0
runtime's mscorwks.dll is 2.0, we can determine the current runtime
according to this version number. The detailed step list is:
1. start the Office application that loads our add-in
2. start process explorer
3. In the View menu of process explorer, select Lower Pane View -> DLLs.
4. In the Process list of process explorer, find the office process and view
its DLL list in the low pane.
5. find mscorwks.dll and look at its version.

Please try the above two solutions and let me know whether they are helpful
to you.

In addition, I'd like to share some other relevant materials with you that
might be useful:

1. How to configure Office application to run against .NET 1.1 runtime.
We can add a config file to the Office exe. Take winword as an example:
create a file named 'winword.exe.config' with the following content, and
place the file together with winword.exe.

<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
<supportedRuntime version="v1.0.3705" />
</startup>
</configuration>
For more readings, please refer to the article:
http://msdn.microsoft.com/en-us/library/ms994410.aspx

2. What is the potential problems if we configure Office application to run
against .NET 1.1 runtime?
The potential problem is that, all the existing Office add-ins that rely on
..NET 2.0 runtime are very likely to crash (fail to be loaded) after we add
this config file.

By the way, I will not be available in the next three days due to a
training. My colleague will continue supporting you if you have any
follow-up questions.

Have a very nice day!

Regards,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx# notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assi stance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


"KeithM" <KeithM@newsgroups.nospam> wrote in message
news:48ea072d$1_1@glkas0286.greenlnk.net...
> Hi,
> I have an office add-in written in C sharp and compiled against .NET v1.1
>
> If I install this addin to a machine running .NET frameworks 1.1 and 2.0,
> which framework will my add in run against?
>
> http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 implies that
> it will run agianst the latest?
>
> Is there any code I can put in my addin to test and find out which
> framework version the code is running against?
>
> This is important because my code is part of a secure system and if it is
> now running against .NET 2.0 (installed by another app) then we may have
> to redo a large part of our testing.
>
> Thanks.
>
>
Re: .NET AddIn - Version 1.1 and 2 [message #461428] Wed, 08 October 2008 00:50 Go to previous message
KeithM
Messages: 40
Registered: July 2006
Member
Ah brilliant.
Thanks for that useful information Jialiang

"Jialiang Ge [MSFT]" <jialge@online.microsoft.com> wrote in message
news:uXO%23oOGKJHA.5232@TK2MSFTNGP05.phx.gbl...
>
Re: .NET AddIn - Version 1.1 and 2 [message #461882] Tue, 07 October 2008 03:01 Go to previous message
jialge
Messages: 1201
Registered: July 2007
Senior Member
Good morning KeithM, nice to see you again.

For Office Add-in components that run in a computer installed with both .NET
runtime 1.1 and 2.0, the addins load with 2.0 unless the process is
configured to run against 1.1. This point is documented at
http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 as you may have
already noticed. In order to find out which framework version the code is
running against at runtime, may I suggest the following two solutions:

Solution 1. Check the runtime version in code.

The function:
System.Runtime.InteropServices.RuntimeEnvironment.GetSystemV ersion() can
tell us the runtime version.
http://msdn.microsoft.com/en-us/library/system.runtime.inter opservices.runtimeenvironment.getsystemversion.aspx
So we can call it in the Addin solution and see if the runtime meets our
requirement.

Solution 2. Check the runtime version with the tool: Process Explorer.

Process explorer can be downloaded at
http://technet.microsoft.com/en-us/sysinternals/bb896653.asp x. We can use
the tool to view the DLLs loaded by a certain process, say Office process.
Because .NET 1.1 runtime loads 1.1 version of mscrowks.dll, and .NET 2.0
runtime's mscorwks.dll is 2.0, we can determine the current runtime
according to this version number. The detailed step list is:
1. start the Office application that loads our add-in
2. start process explorer
3. In the View menu of process explorer, select Lower Pane View -> DLLs.
4. In the Process list of process explorer, find the office process and view
its DLL list in the low pane.
5. find mscorwks.dll and look at its version.

Please try the above two solutions and let me know whether they are helpful
to you.

In addition, I'd like to share some other relevant materials with you that
might be useful:

1. How to configure Office application to run against .NET 1.1 runtime.
We can add a config file to the Office exe. Take winword as an example:
create a file named 'winword.exe.config' with the following content, and
place the file together with winword.exe.

<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
<supportedRuntime version="v1.0.3705" />
</startup>
</configuration>
For more readings, please refer to the article:
http://msdn.microsoft.com/en-us/library/ms994410.aspx

2. What is the potential problems if we configure Office application to run
against .NET 1.1 runtime?
The potential problem is that, all the existing Office add-ins that rely on
..NET 2.0 runtime are very likely to crash (fail to be loaded) after we add
this config file.

By the way, I will not be available in the next three days due to a
training. My colleague will continue supporting you if you have any
follow-up questions.

Have a very nice day!

Regards,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx# notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assi stance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


"KeithM" <KeithM@newsgroups.nospam> wrote in message
news:48ea072d$1_1@glkas0286.greenlnk.net...
> Hi,
> I have an office add-in written in C sharp and compiled against .NET v1.1
>
> If I install this addin to a machine running .NET frameworks 1.1 and 2.0,
> which framework will my add in run against?
>
> http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 implies that
> it will run agianst the latest?
>
> Is there any code I can put in my addin to test and find out which
> framework version the code is running against?
>
> This is important because my code is part of a secure system and if it is
> now running against .NET 2.0 (installed by another app) then we may have
> to redo a large part of our testing.
>
> Thanks.
>
>
Re: .NET AddIn - Version 1.1 and 2 [message #461889] Wed, 08 October 2008 00:50 Go to previous message
KeithM
Messages: 40
Registered: July 2006
Member
Ah brilliant.
Thanks for that useful information Jialiang

"Jialiang Ge [MSFT]" <jialge@online.microsoft.com> wrote in message
news:uXO%23oOGKJHA.5232@TK2MSFTNGP05.phx.gbl...
>
Re: .NET AddIn - Version 1.1 and 2 [message #463456] Tue, 07 October 2008 03:01 Go to previous message
jialge
Messages: 1201
Registered: July 2007
Senior Member
Good morning KeithM, nice to see you again.

For Office Add-in components that run in a computer installed with both .NET
runtime 1.1 and 2.0, the addins load with 2.0 unless the process is
configured to run against 1.1. This point is documented at
http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 as you may have
already noticed. In order to find out which framework version the code is
running against at runtime, may I suggest the following two solutions:

Solution 1. Check the runtime version in code.

The function:
System.Runtime.InteropServices.RuntimeEnvironment.GetSystemV ersion() can
tell us the runtime version.
http://msdn.microsoft.com/en-us/library/system.runtime.inter opservices.runtimeenvironment.getsystemversion.aspx
So we can call it in the Addin solution and see if the runtime meets our
requirement.

Solution 2. Check the runtime version with the tool: Process Explorer.

Process explorer can be downloaded at
http://technet.microsoft.com/en-us/sysinternals/bb896653.asp x. We can use
the tool to view the DLLs loaded by a certain process, say Office process.
Because .NET 1.1 runtime loads 1.1 version of mscrowks.dll, and .NET 2.0
runtime's mscorwks.dll is 2.0, we can determine the current runtime
according to this version number. The detailed step list is:
1. start the Office application that loads our add-in
2. start process explorer
3. In the View menu of process explorer, select Lower Pane View -> DLLs.
4. In the Process list of process explorer, find the office process and view
its DLL list in the low pane.
5. find mscorwks.dll and look at its version.

Please try the above two solutions and let me know whether they are helpful
to you.

In addition, I'd like to share some other relevant materials with you that
might be useful:

1. How to configure Office application to run against .NET 1.1 runtime.
We can add a config file to the Office exe. Take winword as an example:
create a file named 'winword.exe.config' with the following content, and
place the file together with winword.exe.

<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
<supportedRuntime version="v1.0.3705" />
</startup>
</configuration>
For more readings, please refer to the article:
http://msdn.microsoft.com/en-us/library/ms994410.aspx

2. What is the potential problems if we configure Office application to run
against .NET 1.1 runtime?
The potential problem is that, all the existing Office add-ins that rely on
..NET 2.0 runtime are very likely to crash (fail to be loaded) after we add
this config file.

By the way, I will not be available in the next three days due to a
training. My colleague will continue supporting you if you have any
follow-up questions.

Have a very nice day!

Regards,
Jialiang Ge (jialge@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx# notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assi stance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


"KeithM" <KeithM@newsgroups.nospam> wrote in message
news:48ea072d$1_1@glkas0286.greenlnk.net...
> Hi,
> I have an office add-in written in C sharp and compiled against .NET v1.1
>
> If I install this addin to a machine running .NET frameworks 1.1 and 2.0,
> which framework will my add in run against?
>
> http://msdn.microsoft.com/en-us/library/ms994381.aspx?ppud=4 implies that
> it will run agianst the latest?
>
> Is there any code I can put in my addin to test and find out which
> framework version the code is running against?
>
> This is important because my code is part of a secure system and if it is
> now running against .NET 2.0 (installed by another app) then we may have
> to redo a large part of our testing.
>
> Thanks.
>
>
Previous Topic:How to create password protected word document??
Next Topic:Runtime callable wrapper (RCW) scope - process or application doma
Goto Forum: