Bug Report T1172890
Visible to All Users

Visual Studio Report Designer - "Value cannot be null" while attempting to modify XRPictureBox.ImageSource

created 2 years ago (modified 2 years ago)

Clipboard-File-1.png

Code
System.ArgumentNullException: 'Value cannot be null. Parameter name: serviceProvider' > DevExpress.Data.v23.1.dll!DevExpress.Utils.Guard.ThrowArgumentNullException(string propName) Unknown DevExpress.VisualStudioInterop.v23.1.Base.dll!DevExpress.VisualStudioInterop.Base.VisualStudioInterop.GetService<DevExpress.VisualStudioInterop.Base.IProjectItem>(System.IServiceProvider serviceProvider) Unknown DevExpress.Design.v23.1.dll!DevExpress.Utils.Design.ResourceProjectHelper.ActiveProject.get() Unknown DevExpress.Design.v23.1.dll!DevExpress.Utils.Design.ResourceProjectHelper.GetProjectResXFileNames(bool generateEmptyIfNone) Unknown DevExpress.Design.v23.1.dll!DevExpress.Utils.Design.ResourceProjectHelper.LoadProjectResXFiles(object value) Unknown DevExpress.Design.v23.1.dll!DevExpress.Utils.Design.SvgImageEditorViewModel.LoadResources() Unknown [Lightweight Function] DevExpress.Design.v23.1.dll!DevExpress.Utils.Design.VS2022Proxy.ResolveShellAssemblyIfRequired<System.__Canon>(System.Func<System.__Canon> func) Unknown DevExpress.Design.v23.1.dll!DevExpress.Utils.Design.ResourcePickerUIWrapperBase.ViewModel.get() Unknown DevExpress.Design.v23.1.dll!DevExpress.Utils.Design.ResourcePickerUIWrapperBase.EditorView.get() Unknown DevExpress.Design.v23.1.dll!DevExpress.Utils.Design.ImagePickerGalleryBasePage.ImagePickerGalleryBasePage(DevExpress.Utils.Design.IImagePickerForm form) Unknown DevExpress.Design.v23.1.dll!DevExpress.Utils.Design.ImageEditorFormBase.DXImageGalleryPage.get() Unknown DevExpress.Design.v23.1.dll!DevExpress.Utils.Design.ImageOptionsEditorForm.ProjectResourceTypeCheckboxDisplayText.set(string value) Unknown DevExpress.XtraReports.v23.1.Design.dll!DevExpress.XtraReports.Design.VSImageSourceEditor.InitializeForm(DevExpress.Utils.Design.ImageOptionsEditorForm editorForm, DevExpress.XtraPrinting.Drawing.ImageSource source) Unknown DevExpress.XtraReports.v23.1.Design.dll!DevExpress.XtraReports.Design.VSImageSourceEditor.EditValue(System.ComponentModel.ITypeDescriptorContext context, System.IServiceProvider provider, object obj) Unknown DevExpress.XtraPrinting.v23.1.dll!DevExpress.XtraPrinting.Native.Lines.EditorPropertyLine.ModalEditValue() Unknown DevExpress.XtraPrinting.v23.1.dll!DevExpress.XtraPrinting.Native.Lines.EditorPropertyLine.CustomEdit.OnPressButton(DevExpress.XtraEditors.Drawing.EditorButtonObjectInfoArgs buttonInfo) Unknown DevExpress.XtraEditors.v23.1.dll!DevExpress.XtraEditors.ButtonEdit.OnMouseDown(System.Windows.Forms.MouseEventArgs e) Unknown

Answers approved by DevExpress Support

created 2 years ago

We have addressed the issue described in this ticket and will include a fix in our next maintenance update. Should you need to apply our fix prior to official release, you can request a hotfix here.

Important Notes:

  • Hotfixes may be unavailable for Early Access/Beta builds or updates set for release within a week.
  • .NET only: in the NuGet Package Manager, use your personal NuGet feed and check the "Include prerelease" option to view the hotfix package in the "Updates" tab.
    Comments (2)
    NG NG
    Nanci Guadalupe 2 years ago

      Until the revision is ready, how can I change the image of an XrPictureBox?

      Yaroslav (DevExpress Support) 2 years ago

        Hi Nanci,

        Until the fix is here, I'd recommend editing the same report in a .NET Core / .NET 6 project where this design-time issue does not occur. If you're not planning to migrate to this new runtime any time soon, you can add the affected report as a link to a dummy project for editing purposes (see: Add File as a Link on Visual Studio - Debug vs Publish). Of course, changing the image dynamically in code (in the BeforePrint event attached to the target XRPictureBox) will also work.

        I hope this helps.

        Regards,
        Yaroslav

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.