I'm using C# WPF in Visual Studio 2019 with these :
.NetFramework 4.7
Windows Server 2012
Stimulsoft
When I run this line of code when it reaches the report.Render() that will show this error :
XAML:
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp10"
xmlns:wpfViewer="schemas-stimulsoft-com:wpf-viewer" x:Class="WpfApp10.MainWindow"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" Loaded="Window_Loaded">
<Grid>
<wpfViewer:StiWpfViewerControl Name="rptviewer1" HorizontalAlignment="Left" Height="378" Margin="10,10,0,0" VerticalAlignment="Top" Width="772"/>
</Grid>
</Window>
CSharp Code :
using Stimulsoft.Report;
using System.Windows;
namespace WpfApp10
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
var report = new StiReport();
report.Load(@"D:\Myreport1.mrt");
report.Render();
rptviewer1.Report = report;
}
}
}
Error : CS0246: The type or namespace name 'Stimulsoft' could not be found
I Tried These :
- Changing Net Framework
- Clean And Rebuild Solution
- Delete And add Reference again into
Please Help
Update :
The problem is
Coustra.Fody
NuGet I uninstalled that and stimulsoft run successfully !
But I need Fody for publish single exe of my whole project
How to do this ?