Dll net 7.0 not working

I made a Windows wpf project in Net7.0 and 8.0 installed Npoi project from nuget, I tried calling something from Npoi everything works. In the rhino multitarget plugin project, however, I just can’t load the DLL. First of all, to make it work I had to remove the nuget reference because it was the rhinocommon only of the netframework, and I inserted a reference to the rhinocommon of the netcore. The plugin works in general but if I use the Npoi Dll it doesn’t see it. In NetFramewrok however everything works. This is the simple code i used to try Npoi :

try
{
	NPOI.SS.UserModel.IWorkbook workbook = new NPOI.XSSF.UserModel.XSSFWorkbook();

	// Aggiungi un foglio al workbook
	NPOI.SS.UserModel.ISheet sheet = workbook.CreateSheet("Example Sheet");

	// Crea una riga nel foglio a indice 0 (prima riga)
	NPOI.SS.UserModel.IRow row = sheet.CreateRow(0);

	// Crea una cella nella riga a indice 0 (prima cella)
	NPOI.SS.UserModel.ICell cell = row.CreateCell(0);

	// Imposta il valore della cella
	cell.SetCellValue("Hello NPOI!");

	// Salvare il file
	using (var stream = new FileStream("example.xlsx", FileMode.Create, FileAccess.Write))
	{
		workbook.Write(stream);
	}
	System.Windows.MessageBox.Show("Done");
}
catch (Exception ecc)
{
	System.Windows.MessageBox.Show(ecc.Message);
}

Here there are;
1 solution that is ok and there is no reference to rhino
1 solution , rhino plugin with the same dll that is not working
WpfApp2.zip (8.6 MB)
Test.zip (495.5 KB)

Ok i think the problem Is that the dlls i use need to be in the same folder of the rhp so i have to force this duplication. Then the nuget for rhinocommon i s only for net framework so i had to add reference to rhinocommon and obviously remove copy in compilation. Thank even if nobody replied to me.

1 Like