Jun 20, 2019 I noticed this problem for the first time with the Studio One 4.5 release. Then do an install from the downloaded update file. Updating Studio One is a simple process that can be done from the Studio One contextual menu under the HELP menu or by using your computer’s Web browser (Internet Explorer, Safari, Google Chrome, Mozilla Firefox, etc.). PreSonus, the makers of Studio One, has announced Studio One version 3.5.6, offering new featues and a host of bug fixes. New features and improvements. Support for PreSonus Studio 1810 and 1824 USB audio interfaces; Support for DAW remote control from PreSonus StudioLive series III mixers; New options to add and rename Channel name as Macro.
If you have an Excel or Word project that uses any of the following features, you must modify your code if the target framework is changed to the .NET Framework 4 or later:
You must also remove the Microsoft.Office.Tools.Excel.ExcelLocale1033Attribute
and references to the Microsoft.Office.Tools.Excel.ExcelLocale1033Proxy
class from Excel projects that are retargeted to the .NET Framework 4 or later. Visual Studio doesn't remove this attribute or the class reference for you.
The Microsoft.Office.Tools.Excel.ExcelLocale1033Attribute
has been removed from the portion of the Visual Studio 2010 Tools for Office runtime that is used for solutions that target the .NET Framework 4 or later. The common language runtime (CLR) in the .NET Framework 4 and later always passes locale ID 1033 to the Excel object model, and you can no longer use this attribute to disable this behavior. For more information, see Globalization and localization of Excel solutions.
With the project open in Visual Studio, open Solution Explorer.
Under the Properties node (for C#) or the My Project node (for Visual Basic), double-click the AssemblyInfo code file to open it in the code editor.
Note
In Visual Basic projects, you must click the Show All Files button in Solution Explorer to see the AssemblyInfo code file.
Locate the Microsoft.Office.Tools.Excel.ExcelLocale1033Attribute
and either remove it from the file or comment it out.
Projects that were created by using Microsoft Visual Studio 2005 Tools for the Microsoft Office System instantiate the Excel Application object by using the Microsoft.Office.Tools.Excel.ExcelLocale1033Proxy
class. This class has been removed from the portion of the Visual Studio 2010 Tools for Office runtime that's used for solutions that target the .NET Framework 4 or later. Therefore, you must remove or comment out the line of code that references this class.
Open the project in Visual Studio, and then open Solution Explorer.
In Solution Explorer, open the shortcut menu for ThisAddin.cs (for C#) or ThisAddin.vb (for Visual Basic), and then choose View Code.
In the Code Editor, in the VSTO generated code
region, remove or comment out the following line of code.
In projects that target the .NET Framework 3.5, the GetVstoObject
or HasVstoObject
methods are available as extension methods on one of the following native objects in your project: Document, Workbook, Worksheet, or ListObject. When you call these methods, you do not need to pass a parameter. The following code example demonstrates how to use the GetVstoObject method in a Word VSTO Add-in that targets the .NET Framework 3.5.
In projects that target the .NET Framework 4 or later, you must modify your code to access these methods in one of the following ways:
You can still access these methods as extension methods on Document, Workbook, Worksheet, or ListObject objects. However, you must now pass the object returned by the Globals.Factory
property to these methods.
You can alternatively access these methods on the object that is returned by the Globals.Factory
property. When you access these methods in this way, you must pass the native object that you want to extend to the method.
For more information, see Extend Word documents and Excel workbooks in VSTO Add-ins at run time.
In document-level projects that target the .NET Framework 3.5, the generated classes in the projects derive from the following classes in the Visual Studio Tools for Office runtime:
ThisDocument
: Document
ThisWorkbook
: Workbook
Sheet
n: Worksheet
Chart
n: ChartSheet
In projects that target the .NET Framework 4 or later, the types in the Visual Studio Tools for Office runtime listed above are interfaces, instead of classes. The generated classes in projects that target the .NET Framework 4 or later derive from the following new classes in the Visual Studio Tools for Office runtime:
ThisDocument
: DocumentBase
ThisWorkbook
: WorkbookBase
Sheet
n: WorksheetBase
Chart
n: ChartSheetBase
If code in your project refers to an instance of one of the generated classes as the base class that it derives from, you must modify the code.
For example, in an Excel Workbook project that targets the .NET Framework 3.5, you might have a helper method that performs some work on instances of the generated Sheet
n classes in your project.
If you retarget the project to the .NET Framework 4 or later, you must make one of the following changes to your code:
Modify any code that calls the DoSomethingToSheet
method to pass the Base property of a WorksheetBase object in your project. This property returns a Worksheet object.
Modify the DoSomethingToSheet
method parameter to expect a WorksheetBase object instead.
You must add a using (C#) or Imports (Visual Basic) statement for the Microsoft.Office.Tools.Excel or Microsoft.Office.Tools.Word namespace to the top of any code file that uses the Controls property to add Windows Forms controls to the document or worksheet programmatically.
In projects that target the .NET Framework 3.5, the methods that add Windows Forms controls (such as the AddButton
method) are defined in the ControlCollection and ControlCollection classes.
In projects that target the .NET Framework 4 or later, these methods are extension methods that are available on the Controls property. To use these extension methods, the code file in which you use the methods must have a using or Imports statement for the Microsoft.Office.Tools.Excel or Microsoft.Office.Tools.Word namespace. This statement is generated automatically in new projects that target the .NET Framework 4 or later. However, this statement is not added automatically in projects that target the .NET Framework 3.5, so you must add it when you retarget the project.
For more information, see Add controls to Office documents at run time.
In projects that target the .NET Framework 3.5, events of Word content controls are handled by the generic EventHandler<TEventArgs> delegate. In projects that target the .NET Framework 4 or later, these events are handled by other delegates.
The following table lists the Word content control events and the delegates that are associated with them in projects that target the .NET Framework 4 or later.
Event | Delegate to use in .NET Framework 4 and later projects |
---|---|
Added | ContentControlAddedEventHandler |
ContentUpdating | ContentControlContentUpdatingEventHandler |
Deleting | ContentControlDeletingEventHandler |
Entering | ContentControlEnteringEventHandler |
Exiting | ContentControlExitingEventHandler |
StoreUpdating | ContentControlStoreUpdatingEventHandler |
In projects that target the .NET Framework 3.5, you can add custom controls (such as Windows Forms user controls) to a document or worksheet by using the Microsoft.Office.Tools.Excel.OLEObject
and Microsoft.Office.Tools.Word.OLEControl
classes.
In projects that target the .NET Framework 4 or later, these classes have been replaced by the ControlSite and ControlSite interfaces. You must modify code that refers to Microsoft.Office.Tools.Excel.OLEObject
and Microsoft.Office.Tools.Word.OLEControl
to instead refer to ControlSite and ControlSite. Other than the new names, these controls behave the same way that they do in projects that target the .NET Framework 3.5.
For more information, see Add controls to Office documents at run time.
In projects that target the .NET Framework 3.5, you can use the Item(Object) property of the Microsoft.Office.Tools.Word.Document.Controls or Microsoft.Office.Tools.Excel.Worksheet.Controls
collection to determine whether a document or worksheet has a specified control.
In projects that target the .NET Framework 4 or later, the Item(Object) property has been removed from these collections. To determine whether a document or worksheet contains a specified control, use the Contains(System.Object) method of the Controls or Controls collection instead.
For more information about the Controls collection of documents and worksheets, see Add controls to Office documents at run time.
In projects that target the .NET Framework 3.5, several collection types in the Visual Studio Tools for Office runtime derive from the CollectionBase class, such as Microsoft.Office.Tools.SmartTagCollection
, Microsoft.Office.Tools.Excel.ControlCollection
, and Microsoft.Office.Tools.Word.ControlCollection
.
In projects that target the .NET Framework 4 or later, these collection types are now interfaces that do not derive from CollectionBase. Some members are no longer available on these collection types, such as Capacity, List, and InnerList.
If you created your app using an earlier version of the .NET Framework, you can generally upgrade it to .NET Framework 4.5 and its point releases (4.5.1 and 4.5.2), .NET Framework 4.6 and its point releases (4.6.1 and 4.6.2), .NET Framework 4.7 and its point releases (4.7.1 and 4.7.2), or .NET Framework 4.8 easily. Open your project in Visual Studio. If your project was created in an earlier version of Visual Studio, the Project Compatibility dialog box automatically opens. For more information about upgrading a project in Visual Studio, see Port, Migrate, and Upgrade Visual Studio Projects and Visual Studio 2019 Platform Targeting and Compatibility.
However, some changes in the .NET Framework require changes to your code. You may also want to take advantage of functionality that is new in .NET Framework 4.5 and its point releases, in .NET Framework 4.6 and its point releases, in .NET Framework 4.7 and its point releases, or in .NET Framework 4.8. Making these types of changes to your app for a new version of the .NET Framework is typically referred to as migration. If your app doesn't have to be migrated, you can run it in the .NET Framework 4.5 or a later version without recompiling it.
Review the following documents before you migrate your app from earlier versions of the .NET Framework to version 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, or 4.8:
See Versions and Dependencies to understand the CLR version underlying each version of the .NET Framework and to review guidelines for targeting your apps successfully.
Review Application compatibility to find out about runtime and retargeting changes that might affect your app and how to handle them.
Review What's Obsolete in the Class Library to determine any types or members in your code that have been made obsolete, and the recommended alternatives.
See What's New for descriptions of new features that you may want to add to your app.