I'm having an issue when building/running a default new Maui application.
I create a new .NET Maui App (Preview) and make no changes to the autogenerated codebase, but when I try to build or run the application I am getting the following timeout error.
Severity Code Description Project File Line Suppression State
Error MAUI0000 System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenAndPush(Uri uri)
at System.Xml.XmlTextReaderImpl.PushExternalEntityOrSubset(String publicId, String systemId, Uri baseUri, String entityName)
at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId)
at System.Xml.DtdParser.ParseExternalSubset()
at System.Xml.DtdParser.ParseInDocumentDtd(Boolean saveInternalSubset)
at System.Xml.DtdParser.Parse(Boolean saveInternalSubset)
at System.Xml.DtdParser.System.Xml.IDtdParser.ParseInternalDtd(IDtdParserAdapter adapter, Boolean saveInternalSubset)
at System.Xml.XmlTextReaderImpl.ParseDtd()
at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at Svg2VectorDrawable.SvgTree.Parse(String filename) in /Users/runner/work/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/SvgTree.cs:line 35
at Svg2VectorDrawable.Svg2Vector.Parse(String file) in /Users/runner/work/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2Vector.cs:line 84
at Svg2VectorDrawable.Svg2Vector.ParseSvgToXml(String inputSvgFilename, Stream outputStream) in /Users/runner/work/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2Vector.cs:line 773
at Svg2VectorDrawable.Svg2Vector.Convert(String inputSvgFilename, String outputXmlFilename) in /Users/runner/work/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2VectorDrawable.Net/Svg2Vector.cs:line 759
at Microsoft.Maui.Resizetizer.AndroidAdaptiveIconGenerator.Generate() in D:\a\1\s\src\SingleProject\Resizetizer\src\AndroidAdaptiveIconGenerator.cs:line 73
at Microsoft.Maui.Resizetizer.ResizetizeImages.ProcessAppIcon(ResizeImageInfo img, ConcurrentBag`1 resizedImages) in D:\a\1\s\src\SingleProject\Resizetizer\src\ResizetizeImages.cs:line 132
at Microsoft.Maui.Resizetizer.ResizetizeImages.<>c__DisplayClass26_0.<ExecuteAsync>b__0(ResizeImageInfo img) in D:\a\1\s\src\SingleProject\Resizetizer\src\ResizetizeImages.cs:line 88
at Microsoft.Maui.Resizetizer.AsyncTaskExtensions.<>c__DisplayClass0_0`1.<ParallelForEach>b__0(TSource s) in D:\a\1\s\src\SingleProject\Resizetizer\src\AsyncTaskExtensions.cs:line 21 MauiApp C:\Users\rea\.nuget\packages\microsoft.maui.resizetizer.sdk\6.0.101-preview.10.2068\build\Microsoft.Maui.Resizetizer.Sdk.targets 463
I am running
vs2022 preview 1.1
dotnet v6.0.100
Android 12.0 (SDK 31)
Can someone help with what I'm missing?
Sorry it took a while! It's weird that it would spawn this error, but I think you might want to avoid using MauiApp as a name for your solution and project as it's also a type in the source and that causes issues for me to build it as well.
Try again with a solution with a different name and let me know if that solves it!
Related
Following issue occurs when building the project.
Output Window Details
*1>------ Rebuild All started: Project: XYZ.Droid, Configuration: Debug Any CPU ------
1>C:\Users\amila.s\Desktop\XYZ\ABC.Mobile-develop\ABC.Mobile-develop\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets(114,3): error : End of Central Directory record could not be found.
1>C:\Users\amila.s\Desktop\XYZ\ABC.Mobile-develop\ABC.Mobile-develop\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets(114,3): error : at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()
1>C:\Users\amila.s\Desktop\XYZ\ABC.Mobile-develop\ABC.Mobile-develop\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets(114,3): error : at System.IO.Compression.ZipArchive.Init(Stream stream, ZipArchiveMode mode, Boolean leaveOpen)
1>C:\Users\amila.s\Desktop\XYZ\ABC.Mobile-develop\ABC.Mobile-develop\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets(114,3): error : at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding)
1>C:\Users\amila.s\Desktop\XYZ\ABC.Mobile-develop\ABC.Mobile-develop\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets(114,3): error : at Xamarin.Build.Download.XamarinBuildAndroidAarRestore.LoadResource(String resourceFullPath, String assemblyName)
1>C:\Users\amila.s\Desktop\XYZ\ABC.Mobile-develop\ABC.Mobile-develop\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets(114,3): error : at Xamarin.Build.Download.BaseXamarinBuildResourceRestore.MergeResources(IAssemblyResolver resolver, String originalAsmPath, String mergedAsmPath, String assemblyName, List`1 resourceItems)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========*
Error Window Details
Severity Code Description Project File Line Suppression State
Error End of Central Directory record could not be found. at
System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory() at
System.IO.Compression.ZipArchive.Init(Stream stream, ZipArchiveMode
mode, Boolean leaveOpen) at
System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode
mode, Boolean leaveOpen, Encoding entryNameEncoding) at
Xamarin.Build.Download.XamarinBuildAndroidAarRestore.LoadResource(String
resourceFullPath, String assemblyName) at
Xamarin.Build.Download.BaseXamarinBuildResourceRestore.MergeResources(IAssemblyResolver
resolver, String originalAsmPath, String mergedAsmPath, String
assemblyName, List`1 resourceItems) PayByCar.Droid
There are seem to be no much support regarding this issue. It would be highly appreciated if anyone could help on this. Thanks.
Just in case anyone else is getting this issue as well, (And cannot simply do like what a lot of other threads recommend, by changing the version of Xamarin.Build.Download to a previous version):
My solution was to go to C:\Users\(username)\AppData\Local and delete the Xamarin and XamarinBuildDownloadCache, then rebuild my project.
I presume that due to a faulty network connection, one or more files had been corrupted during the initial download process, which made it so that even clearing just about everything (except that directory) would not fix the issue.
I am getting client rendering error for one of my report. I am getting this error only when running from our Testing Server, the report runs fine in my development environment (i.e from my local machine Visual Studio IDE).
Below are the details of the error. I am totally stuck as I am not able to make anything out of the stack trace. What should be my next step?
ASPX Code:
<rsweb:ReportViewer ID="rptvwReport" runat="server" InteractiveDeviceInfos="(Collection)">
<LocalReport ReportPath="Reports\ChartReport.rdlc"></LocalReport>
</rsweb:ReportViewer>
ASPX.CS Code:
ReportDataSource rdsReport = new ReportDataSource();
rdsReport.Value = myDataList;//List<Data>
rdsReport.Name = "DS";
rptvwReport.LocalReport.ReportPath = HttpContext.Current.Request.MapPath(HttpContext.Current.Request.ApplicationPath) + #"/Reports/ChartReport.rdlc";
rptvwReport.LocalReport.DataSources.Add(rdsReport);
rptvwReport.LocalReport.Refresh();
Note: I am using Visual Studio 2010 & SQL Server 2008. For testing purpose I am using same database for both Development & Testing environment.
Error Message: An error occurred during client rendering.
Inner Exception: Object reference not set to an instance of an object.
StackTrace: at Microsoft.Reporting.WebForms.LocalHtmlRenderer.Render(NameValueCollection deviceInfo, PageCountMode pageCountMode, ReportControlSession reportControlSession, CreateAndRegisterStream streamCallback, String& scrollScript, String& pageStyle) at Microsoft.Reporting.WebForms.ReportControlSession.RenderReportHTML4(NameValueCollection deviceInfo, PageCountMode pageCountMode, String& scrollScript, String& pageStyle) at Microsoft.Reporting.WebForms.ReportControl.RenderReport(ReportControlSession session, String viewerInstanceIdentifier, PageCountMode pageCountMode, Int32 pageNumber, InteractivityPostBackMode interactivityMode, SearchState searchState, String replacementRoot, String hyperlinkTarget, ScrollTarget scrollTarget, String alertMessage, DeviceInfoCollection initialDeviceInfos, String browserMode, Boolean sizeToContent) at Microsoft.Reporting.WebForms.ReportArea.RenderReport(ReportControlSession session, String viewerInstanceIdentifier, PageCountMode pageCountMode, Int32 pageNumber, InteractivityPostBackMode interactivityMode, SearchState searchState, String replacementRoot, String hyperlinkTarget, ScrollTarget scrollTarget, String alertMessage, DeviceInfoCollection initialDeviceInfos, String browserMode, Boolean sizeToContent) at Microsoft.Reporting.WebForms.ReportViewer.RenderReport(Boolean updateDocMap) at Microsoft.Reporting.WebForms.ReportViewer.OnPreRender(EventArgs e)
Can you check that in your BIN folder you have the following: -
Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.WebForms.dll
Microsoft.ReportViewer.WinForms.dll
Your project will probably only have a reference to Microsoft.ReportViewer.WebForms.dll; if you need to locate them, they will be in C:\Program Files (x86)\Microsoft Visual Studio 10.0\ReportViewer
I had a similar issue with an intranet app that used the ReportViewer, same versions of VS and SQL as you, and I had to include the additional DLL's in the publication package.
My visual studio is acting weird. When I try to open a fresh unit test it freezes, gives me three options (close, restart, debugg), and does it again. When I open an existing file; they open but do not Run or Execute.
When trying to test or debug, I recieve a message that states "Unexpected error detected. Check the Tests Output Pane for details.".
Heading over to the output pane I get this message(Show output from tests):
" System.ArgumentNullException: Value cannot be null.
Parameter name: source
at Microsoft.VisualStudio.Shell.ValidateArg.NotNull[T](T arg, String parameterName)
at Microsoft.VisualStudio.Shell.ValidateArg.NotNullOrEmpty[T](IEnumerable`1 arg, String parameterName)
at Microsoft.VisualStudio.Shell.Interop.VSProjectExtensions.CompareNormalizedPath(String source, String target)
at Microsoft.VisualStudio.Shell.Interop.VSProjectExtensions.GetKeyOutputForIVsOutputGroup(IVsOutputGroup outputGroup)
at Microsoft.VisualStudio.Shell.Interop.VSProjectExtensions.GetProjectOutputPath(IVsProjectCfg2 projectConfig, String groupName)
at Microsoft.VisualStudio.Shell.Interop.VSProjectExtensions.GetKeyOutputForGroup(IVsSolutionBuildManager buildManager, IVsProject project, String groupName)
at Microsoft.VisualStudio.TestWindow.VsAdapters.VsTestContainer.get_Source()
at Microsoft.VisualStudio.TestWindow.VsAdapters.VsTestContainer.CreateTimeStamp()
at Microsoft.VisualStudio.TestWindow.VsAdapters.VsTestContainer..ctor(ITestContainerDiscoverer discoverer, ILogger log, IVsProject project, IServiceProvider serviceProvider, IVsAppContainerUtilities appContainerUtilities)
at Microsoft.VisualStudio.TestWindow.VsAdapters.VsProjectOutputContainerDiscoverer.<get_TestContainers>b__0(IVsProject p)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Microsoft.VisualStudio.TestWindow.Controller.TestContainerDiscovererExtension.GetSortedContainers(ITestContainerDiscoverer discoverer)
at Microsoft.VisualStudio.TestWindow.Controller.TestContainerProvider.GetContainersFromDiscoverer(ITestContainerDiscoverer discoverer)"
I have tried updating my SSDT version to the latest and that has not been of help to me. Please help I depend on this program for day to day usage.
I have an odd happening where the C# app I have made in VS2012 is working just fine on my pc under IIS, but when I put it up on the server what happens is I'm logging errors like,
2013-07-02 10:08:44,572 [5] ERROR Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine [(null)] <(null)> - Could not render view
NVelocity.Exception.MethodInvocationException: Invocation of method 'theme_skin_url' in stellar.Services.themeService threw exception System.NullReferenceException : Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at stellar.Services.themeService.theme_skin_url(site site, String theme, String mode, String type) in d:\._GIT_\HIV PROJECT\stellar\Services\site_controlls\themeService.cs:line 292
at stellar.Services.themeService.theme_skin_url(String type) in d:\._GIT_\HIV PROJECT\stellar\Services\site_controlls\themeService.cs:line 280
--- End of inner exception stack trace ---
at NVelocity.Runtime.Parser.Node.ASTMethod.Execute(Object o, IInternalContextAdapter context)
at NVelocity.Runtime.Parser.Node.ASTReference.Execute(Object o, IInternalContextAdapter context)
at NVelocity.Runtime.Parser.Node.ASTReference.Render(IInternalContextAdapter context, TextWriter writer)
at NVelocity.Runtime.Parser.Node.ASTBlock.Render(IInternalContextAdapter context, TextWriter writer)
at Castle.MonoRail.Framework.Views.NVelocity.CustomDirectives.CaptureForDirective.Render(IInternalContextAdapter context, TextWriter writer, INode node)
at NVelocity.Runtime.Parser.Node.ASTDirective.Render(IInternalContextAdapter context, TextWriter writer)
at NVelocity.Runtime.Parser.Node.SimpleNode.Render(IInternalContextAdapter context, TextWriter writer)
at NVelocity.Template.Merge(IContext context, TextWriter writer)
at Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine.RenderLayout(String layoutName, String contents, IContext ctx, TextWriter output)
at Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine.ProcessLayoutRecursively(StringWriter writer, IEngineContext context, IController controller, IControllerContext controllerContext, IContext ctx, TextWriter finalOutput)
at Castle.MonoRail.Framework.Views.NVelocity.NVelocityViewEngine.Process(String viewName, TextWriter output, IEngineContext context, IController controller, IControllerContext controllerContext)
Now you'll see that it's looking for something in
d:\._GIT_\HIV PROJECT\stellar\Services\site_controlls\themeService.cs
but on the server where it's running it's really
C:\inetpub\wwwroot\domain.com\Services\site_controlls\themeService.cs
Now I know for sure it's not hard coded on the server, and I even went to the length of near hard coding the root path in the webconfig on the method that gets the app path.
public static String root_path() {
NameValueCollection section = (NameValueCollection)ConfigurationManager.GetSection("site_config");
string setting = section["root"];
if (String.IsNullOrWhiteSpace(setting)) return setting;
String path = VirtualPathUtility.ToAppRelative("~");
if (!String.IsNullOrWhiteSpace(path)) return path;
path = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().GetName().CodeBase).LocalPath).Replace("bin", "");
return path;
}
Where the web.config has
<site_config>
<add key="installed" value="False" />
<add key="root" value="C:\inetpub\wwwroot\domain.com" />
</site_config>
So it's confusing that when I get the logs of the server I end up with the path in the error log of the dev pc I work on not the server.
The question is, other then hard coded my me, what condition would allow for the path of where a app is not loaded, is not used but the path of where it was developed? Is it in the project dll?
The folders you see there are taken from the projects debug symbols. They are only there for you to know where the files were located on the build computer.
This information is usually not accessible from your code so the error you are encountering is probably something else in the implementation of theme_skin_url.
We have an application that we need to begin testing and developing in Windows 7 environment. It works fine compiling under WinXP in VS2008, no problems. However when I went to compile it on a windows 7 machine using VS2008 today I get the following error:
Error 12 The "GenerateResource" task failed unexpectedly.
System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(MemoryStream stream)
at System.Drawing.Image.System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo si, StreamingContext context)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
at System.Resources.ResourceWriter.WriteValue(ResourceTypeCode typeCode, Object value, BinaryWriter writer, IFormatter objFormatter)
at System.Resources.ResourceWriter.Generate()
at System.Resources.ResourceWriter.Dispose(Boolean disposing)
at System.Resources.ResourceWriter.Close()
at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(IResourceWriter writer)
at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(String filename)
at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFile)
at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, List`1 inputs, List`1 outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass)
at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, List`1 inputs, List`1 outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass)
at Microsoft.Build.Tasks.GenerateResource.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)
I cannot for the life of me run this one down. I have visited the msdn forums and find that it is an issue for a lot of people, but no consistent solution has been provided by MS or anyone else.
Has anyone seen this before and fixed it? Please advise is needed!
Thanks
I compiled using the command line msbuild and that identified the problem location.
It was a resx file in a class which had one unused image in it. I removed that and all was good again. Can build fine now.
After hours of troubleshooting, I opened and built the project using the VS 2010 command line prompt using MSBUILD "my solution file path here". This provided a more visible sequence of build events, and I found my project was failing just after it compiled form 16. The forms compiling appeared to be going in order of the objects in the solution explorer. So I checked the next form and found it contained a picture box. I also checked the form after that one and found I could not open the designer without errors(object reference not set to instance of object). So apparently, the problem was now two-fold.
To resolve I had to remove the picture box object from the first form I identified as problematic (it was not being used any way) as it appeared to be corrupted. I found the second form with the null reference exception was using a user control. The code for the constructor of the user control was attempting to pass an object to a container before calling InitializeComponent(). This created the null reference since the container hadn't event been created in InitializeComponent when the problematic code was called.
After resolving the issues in the above paragraph my solution compiled under Windows 7.
There is a GDI update for Windows 7, I think, if I'm not mistaken. Maybe that will solve the issue. Does your solution build using Msbuild on the commsnd line?
Do you use TIFF images in your app?
Some time ago, I also had a problem with TIFF images as part of reports that wouldn't compile under Win7 x64 although it compiled like a charm under Vista x86. The error message also involved GDI+. I saved the images under a different format (PNG) and the problem vanished.
At the time (around March 2011), I first ensured that my Windows was up-to-date but it didn't solve the problem. So maybe there is such an update as mentionned by Erik but it didn't come through Windows Update back then (Maybe it's newer).
Delete the resources from the resource manager (right click on each and delete) then add them back. for me it solve the problem.
i had same problem.
i just used msbuild myProject.sln command and it fixed and built successfully with no errors! now i can manually build my solution.
no need to reAdding my resources